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 Fri, 29 Jun 2001, Joseph S. Myers wrote:

> On Thu, 28 Jun 2001, Mark Mitchell wrote:
> 
> > 2.Do people really use "prefix attributes"?  They are undocumented,
> >   as far as I can tell.  (This is the bit where you fix attributes
> >   in with the decl-specifier-seq in a declaration, like this:
> > 
> >     void __attribute__ ((pure)) f();
> > 
> >   Very ugly.  I expect we daren't remove these, right?
> 
> They are documented.  See "Attribute Syntax" in the manual.  As someone
> noted, they are necessary to put attributes on a function definition.  I

 ... but there seem to be various places in which prefix attributes are
treated differently to postfix attributes, e.g. they don't get passed to
SET_DEFAULT_DECL_ATTRIBUTES.  I think it would make sense to say that all
attributes on a declaration are conceptually combined into a single list,
and the order in that list must not matter (since the order can get
muddled in various places within GCC already), and change all the places
that pass two lists to pass just one; if this is felt useful then I can
make the appropriate changes.

Can someone say exactly what each of INSERT_ATTRIBUTES and
PRAGMA_INSERT_ATTRIBUTES is meant to do?  INSERT_ATTRIBUTES is documented
but nowhere defined; PRAGMA_INSERT_ATTRIBUTES is undocumented but defined
by the SH port.

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