[Bug c++/58798] class with a class reference member generates unjustified warning
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 30 00:15:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58798
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Szikra from comment #3)
> The warning is still there if I use the -Wno-packed option:
> g++ -std=gnu++11 -fpack-struct -Wno-packed eeprom.cpp -o eeprom
> Why?
Because the warning isn't controlled by the -Wpacked option. If it was, it
would say [-Wpacked] after the warning. I think that's a bug, every warning
should be controlled by some -Wxxx option.
If the warning was controlled by an option you could suppress it with -Wno-xxx
or a #pragma.
More information about the Gcc-bugs
mailing list