[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 --- Comment #8 from Jonathan Wakely --- There was no change. r131499 was done more than a decade ago.
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 Jonathan Wakely changed: What|Removed |Added Resolution|FIXED |WORKSFORME
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 Sylvestre Ledru changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Sylvestre Ledru --- Indeed, thanks for implementing the change!
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 --- Comment #6 from nightstrike --- (In reply to Martin Sebor from comment #5) > -Wignored-qualifiers has been in -Wextra since r131499. Based on the > Firefox review I think the request is actually to remove the warning from > -Wextra (or they thought it was in -Wall and were asking to move it from > there and put it under -Wextra). Maybe they compile with -Wextra and don't know it no idea. However, comment 8 at https://bugzilla.mozilla.org/show_bug.cgi?id=1411034#c8 says: "It should probably be enabled only in -Wextra" Also, the title of the bug asks for it to be moved to -Wextra. It's in there, so I think it's correct to just close the PR :) :) :)
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #5 from Martin Sebor --- -Wignored-qualifiers has been in -Wextra since r131499. Based on the Firefox review I think the request is actually to remove the warning from -Wextra (or they thought it was in -Wall and were asking to move it from there and put it under -Wextra).
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 nightstrike changed: What|Removed |Added CC||nightstrike at gmail dot com --- Comment #4 from nightstrike --- It looks to me like this has been done, at least for g++ 8.1.0: $ g++ a.cc -c $ g++ a.cc -c -Wextra a.cc:1:5: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] int const f() { return 0; } ^
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 --- Comment #3 from Sylvestre Ledru --- Jonathan, if I write a patch to implement the change, will you accept it?
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 Jonathan Wakely changed: What|Removed |Added CC||andi at mozilla dot com --- Comment #2 from Jonathan Wakely --- *** Bug 83085 has been marked as a duplicate of this bug. ***
[Bug c++/82711] -Wignored-qualifiers could be moved into -Wextra
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82711 --- Comment #1 from Jonathan Wakely --- I'd argue it doesn't help readability at all if it makes the code appear to do one thing but it actually does something different. The warning has always been in -Wall for ignored qualifiers on return types, and nobody complained, so we don't want to change that. Maybe I should have added a separate option for ignoring qualifiers in casts. Intel ICC warns about return types in -Wall but needs -Wextra for the warning about the cast here: const int f(long i) { return static_cast(i); } 1 : (1): warning #858: type qualifier on return type is meaningless const int f(long i) ^ 3 : (3): warning #191: type qualifier is meaningless on cast type return static_cast(i); ^ Compiler exited with result code 0 Alternatively, maybe the world's C++ code just needs to get fixed to stop writing things that have no meaning :-)