This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]