This is the mail archive of the gcc-prs@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: c++/7585: Attributes for nested typedef-name ignored


The following reply was made to PR c++/7585; it has been noted by GNATS.

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: bangerth@dealii.org
Cc: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: c++/7585: Attributes for nested typedef-name ignored
Date: 31 Oct 2002 05:05:27 +0100

 bangerth@dealii.org writes:
 
 | Synopsis: Attributes for nested typedef-name ignored
 | 
 | State-Changed-From-To: open->analyzed
 | State-Changed-By: bangerth
 | State-Changed-When: Wed Oct 30 16:32:50 2002
 | State-Changed-Why:
 |     I can see this as well, but I imagine the syntax is wrong:
 |     shouldn't it be
 |         typedef struct { } __attribute__((__aligned__(__alignof__(int)))) Y;
 |     
 |     instead of
 |     
 |         typedef struct { } Y __attribute__((__aligned__(__alignof__(int))));
 |     
 |     ??
 
 Maybe.  But then, I think __alignof__(Y) should return
 __alignof__(int) if the attribute is being applied to Y.
 
 Said differently, what do you envision for the "right" syntax for
 
    typedef unsigned char type[sizeof(int)] 
              __attribute__((__aligned__(__alignof__(int))));
 
 ?
 
 -- Gaby


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