https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83732

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
That doesn't change anything, the default is gnu++14 anyway. My point is not
that the compiler is in C++98 mode, just that the condition for the warning
uses the old definition. The code confirms it:

          if (!layout_pod_type_p (type) && !TYPE_PACKED (type))
            {
              warning_at
                (DECL_SOURCE_LOCATION (x), 0,
                 "ignoring packed attribute because of unpacked non-POD field
%q#D",
                 x);
              cant_pack = 1;
            }

layout_pod_type_p checks if the type is a "POD for the purpose of layout" which
is false for this type, even though it's a POD according to C++11 and later.
The definition of "POD for the purpose of layout" is fixed bythe ABI and so
independent of the -std option, because it must be stable across standard
versions.

Reply via email to