This is the mail archive of the gcc@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: Proposed semantics for attributes in C++ (and in C?)


On Mon, 16 Oct 2006, Jason Merrill wrote:

> Mark Mitchell wrote:
> > Yes, I would be happy to explicitly ignore semantic attributes in typedefs
> > as well, with a warning (or even an error).  However, I had not realized
> > that we ever did that; I'm surprised that the change that instituted this is
> > so recent.  I suppose that explains why we're suddenly seeing a rash of such
> > problems.  Jason, as you made this change, do you have any comments on the
> > proposal?
> 
> I don't think my patch changed the handling of class typedefs; certainly my
> intent was only to change how we handle
> 
>   class __attribute ((foo)) C
> 
> Previously we rejected it, now we apply the attributes to the class.

I was referring to the change in extend.texi

-the closing brace.  It is ignored if the content of the structure, union
-or enumerated type is not defined in the specifier in which the
-attribute specifier list is used---that is, in usages such as
-@code{struct __attribute__((foo)) bar} with no following opening brace.
+the closing brace.  The former syntax is preferred.

(note that r115086 changed extend.texi but extend.texi doesn't appear to 
be mentioned in the log message).  The old text only covered some of the 
problem cases, but the statement that attributes were ignored in such 
cases was still removed.

-- 
Joseph S. Myers
joseph@codesourcery.com


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