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]

Re: Attribute questions


On 2 Jul 2001, Jason Merrill wrote:

> Apparently so.  I can't remember what I was thinking; it seems clear now
> that prefix attributes should be treated syntactially like
> declspecs/cv-quals, and bind to the left.
> 
> > I must suspect that my documentation rather than the C++ front end is
> > correct here, and implement what I've documented for C.
> 
> Please.

OK, if reverting your patch (revision 1.240 of cp/decl.c) leaves the
compiler passing its testsuite, I suggest you start by doing that, since I
won't have the full implementation for both C and C++ (making attributes
such as "format" work inside declarators, etc.) done immediately.

In some places there is a kludge that if a function attribute is applied
to a function pointer, then it applies to the pointer target type instead.
I'll probably make this more systematic (for attributes which only make
sense on functions, not data).  If MS-compatibility (or compatibility with
legacy GCC-compiled code which doesn't expect a tight formal spec for
where attributes go and just puts them anywhere that happened to work)
turns out to need any more such kludges for cases such as here - I
couldn't find documentation for what MS think the formal syntax of __cdecl
should be - then we can consider adding them later.

-- 
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]