public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7362: "Pack" attribute causes compiler error on empty structs
@ 2002-07-20 11:36 gonz
0 siblings, 0 replies; only message in thread
From: gonz @ 2002-07-20 11:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 7362
>Category: c++
>Synopsis: "Pack" attribute causes compiler error on empty structs
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sat Jul 20 11:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Pete Gonzalez <gonz@bluel.com>
>Release: gcc version 2.95.2
>Organization:
>Environment:
Occurs on the GCC shipping with the current distribution of Debian Linux. Originally discovered with GCC 3.0.4 on Win32.
>Description:
The "__attribute__((packed))" modifier cannot be applied to an empty struct because it produces an Internal Compiler Error.
>How-To-Repeat:
int test() {
__attribute__((packed))
struct TEmpty { }; // <-- crash here
}
>Fix:
The correct behavior is probably to reduce the size of the struct from 4 to 1.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-20 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-20 11:36 c++/7362: "Pack" attribute causes compiler error on empty structs gonz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).