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

--- Comment #8 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Jonathan Wakely from comment #7)
> Using the non-standard packed attribute already makes the code non-portable.

It may be non-standard, but its still portable
as long as all compilers agree on implementing
the particular extension. And the "packed" extension
is AFAIK the very old one and most widely used.
Unsupporting it is far from good decision.
Non-standard things should not be automatically
treated as "non-portable" IMO.

Kenman Tsang:
This bug was initially not about the wrong object
size. It was about the wrong diagnostic that says
"ignoring packed attribute" but actually packs an
object perfectly well. Your example demonstrates
the case where the "packed" attribute is really
ignored (and the diagnostic is in line with that),
so this is a different problem.
For which I opened another ticket:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84194
You may want to join that ticket, leaving this one
just for the diagnostic problem.

Reply via email to