Originally posted by AHSauge
View Post
Announcement
Collapse
No announcement yet.
GCC Unlikely To Adopt A "-Weverything" For Exposing All Possible Code Warnings
Collapse
X
-
Originally posted by bison View Post
I use -Wall -Wextra, and sometimes that seems like too much -- you almost have to use -Wno-unused-parameter with anything that uses callback functions.
- Likes 2
Comment
-
Originally posted by brrrrttttt View PostI cannot forsee myself ever using this... does anyone that actually maintains a non-trivial piece of software want this?
As other explained some useful warnings are not reported by Wall or Wextra...
Comment
-
That is dumb. The whole reason some warnings aren't in -Wall is because they are not always useful. All those that make sense everywhere should be in -Wall, or if you want to be in pedantic, and don't mind a few false positives, in -Wextra...
- Likes 2
Comment
-
Originally posted by bison View Post
I use -Wall -Wextra, and sometimes that seems like too much -- you almost have to use -Wno-unused-parameter with anything that uses callback functions.
- Likes 1
Comment
-
Originally posted by Anty View PostThat sounded like "I have big, old, bloated codebase. I'm not mad enough to see all this $hit".
As other explained some useful warnings are not reported by Wall or Wextra...
Comment
-
Just tried -Weverything on valid C++17 code. It throws tens of...
incompatible with C++98 [-Wc++98-compat]
warnings. The same code compiles without any diagnostic messages with -Wall -Wextra -Wpedantic -Wconversion -Weffc++. In fact, the lack of retro-compatibility is the only kind of warning issued, repeated again and again and again.
Now, this is sufficient for me to deem it useless, unless I wanted to write in prehistoric C++98...
- Likes 7
Comment
-
Yet another GNU project whose devs wouldn't understand a point if it stabbed them in the eye. Hurd, GNOME (GNU Network Object Model Environment, iirc), GNUStep (obsoleteish and nearly unmaintained), and now GCC. Or again, rather.
Just add the switch and document that it is only for devs. Autotag bugs as lowest priority. Done.
- Likes 1
Comment
-
It's their decision but I personally like the idea of being able to specify -Weverything and then individually disable the specific warnings that I don't want. So it would effectively put GCC into a "all warnings by default" mode instead of a "no (or very few) warnings by default mode". So you have to toggle off options instead of toggle them on.
- Likes 4
Comment
-
Originally posted by carewolf View Post
Why? Just don't name parameters you don't use.. Can you give an example where -Wunused-parameter would give a false positive? I only ever disable it because some code (especially Google code) has unused parameters everywhere and don't care half their logic and parameters is long dead and now unused deadweight.
Comment
Comment