[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Tobias Burnus burnus at gcc dot gnu.org --- Fixed for Fortran by the work done for and around PR44054. (The C++ issue mentioned in comment 4 is also fixed in GCC 5 - but probably was already fixed for GCC 4.7, 4.8 and/or 4.9.)
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 --- Comment #5 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Simon Richter from comment #4) Testcase is simple: $ cat tt.cpp void bar(int baz) { } $ g++-4.7 -c -W -Wall -Werror -Wno-unused tt.cpp $ g++-4.8 -c -W -Wall -Werror -Wno-unused tt.cpp tt.cpp:1:6: error: unused parameter ‘baz’ [-Werror=unused-parameter] void bar(int baz) { } ^ cc1plus: all warnings being treated as errors There is a bug in the logic of the autogenerated code: if (!opts_set-x_warn_unused_parameter (opts-x_warn_unused opts-x_extra_warnings)) handle_generated_option (opts, opts_set, OPT_Wunused_parameter, NULL, value, lang_mask, kind, loc, handlers, dc); When processing -Wno-unused, opts-x_warn_unused is false, so we don't turn off OPT_Wunused_parameter. I think the generated code should be: if (!opts_set-x_warn_unused_parameter opts-x_extra_warnings) for case OPT_Wunused and if (!opts_set-x_warn_unused_parameter opts-x_warn_unused) for the case OPT_Wextra. So optc-gen.awk needs adjusting. Let me see if I can find time to do this in the coming weeks/months, but if anyone wants to investigate how to fix it, please go ahead. I think this is a different bug than the -Wno-tabs, since that is not handled by the autogenerated code.
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added CC|manu at gcc dot gnu.org| Blocks|57622 | --- Comment #6 from Manuel López-Ibáñez manu at gcc dot gnu.org --- I created bug 52347 to track the autogenerated code issue. This bug should be fixed if Fortran's -Wall is moved to the autogenerated method of handling group options (see options.texi)
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 Simon Richter Simon.Richter at hogyros dot de changed: What|Removed |Added CC||Simon.Richter at hogyros dot de --- Comment #2 from Simon Richter Simon.Richter at hogyros dot de --- In 4.8, this causes build failures for me: $ g++ -g -Wall -W -Werror -Wno-unused -I. -o stage1/tree_bison_lex.o -c tree_bison_lex.cpp tree_bison_lex.cpp:1744:13: error: unused parameter 'yyscanner' [-Werror=unused-parameter] As can be guessed from the name, this is a file that is generated from flex, which is why I've added -Wno-unused for this file specifically. 4.7 did not warn.
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 --- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Simon Richter from comment #2) In 4.8, this causes build failures for me: $ g++ -g -Wall -W -Werror -Wno-unused -I. -o stage1/tree_bison_lex.o -c tree_bison_lex.cpp tree_bison_lex.cpp:1744:13: error: unused parameter 'yyscanner' [-Werror=unused-parameter] Could you attach a self-contained preprocessed testcase? See http://gcc.gnu.org/bugs/
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 --- Comment #4 from Simon Richter Simon.Richter at hogyros dot de --- Testcase is simple: $ cat tt.cpp void bar(int baz) { } $ g++-4.7 -c -W -Wall -Werror -Wno-unused tt.cpp $ g++-4.8 -c -W -Wall -Werror -Wno-unused tt.cpp tt.cpp:1:6: error: unused parameter ‘baz’ [-Werror=unused-parameter] void bar(int baz) { } ^ cc1plus: all warnings being treated as errors
[Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52347 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Comment #1 from Manuel López-Ibáñez manu at gcc dot gnu.org 2012-02-23 08:37:08 UTC --- (In reply to comment #0) However, for tab warnings -Wno-tabs cannot be used to turn off the warning, enabled by -Wall. I wouldn't be surprised if that also holds for other warnings, enabled by -Wall or -Wextra. Found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9942915c9c41b151 Sure, it happens with many flags in fact, not only in Fortran, since -Wall either does not check whether the flag was already initialized, or it sets the value too early. Ideally, flags that enable other flags should be checked last, and they should only touch flags that haven't been set already in the command-line. But this is only done on a case-by-case basis by using -1 as starting value (I did it mostly for -Wextra, -Wunused, and -Wimplicit). It would be nice that the options handling code would take care of this, by specifying the relations in *.opt files.