[Bug c++/58798] class with a class reference member generates unjustified warning
steven.spark at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jan 29 15:55:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58798
--- Comment #2 from Szikra <steven.spark at gmail dot com> ---
Created attachment 40615
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40615&action=edit
preprocessed test case
Compiled with
g++ --save-temps -std=gnu++11 -fpack-struct eeprom.cpp -o eeprom
eeprom.cpp: In instantiation of 'class EepromAccessor<unsigned int>':
eeprom.cpp:29:16: required from here
eeprom.cpp:16:8: warning: ignoring packed attribute because of unpacked non-POD
field 'unsigned int& EepromAccessor<unsigned int>::data_'
T& data_;
^
More information about the Gcc-bugs
mailing list