This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Possible Compiler Bug
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: "Brunner, Brian T" <Brian dot T dot Brunner at GAI-Tronics dot com>
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Thu, 29 Aug 2002 17:44:54 +0100 (BST)
- Subject: Re: Possible Compiler Bug
On Thu, 29 Aug 2002, Brunner, Brian T wrote:
> struct {
> int data1i;
> char data1c;
> struct {
> int data2i1;
> char data2c;
> int data2i2;
> } mumble[2] ((__attribute__)) __packed__ ;
> } foo[2] ((__attribute__)) __packed__;
These attributes specify that the array, not the structure type within it
is packed. See the "Attribute Syntax" section in the manual (but I don't
know whether that section was present in your version). Try placing the
attributes after the struct keyword or after the closing brace (but I
don't know how accurately your version implements the specification for
what attributes in different places apply to, ask Red Hat about their
compiler, see <http://gcc.gnu.org/gcc-2.96.html>).
--
Joseph S. Myers
jsm28@cam.ac.uk