This is the mail archive of the 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: [plugins] Add user attribute

On Wed, 1 Apr 2009, Richard Guenther wrote:

> On Tue, Mar 31, 2009 at 8:17 PM, Taras Glek <> wrote:
> > Hi,
> > This patch adds a user("annotation") attribute to gcc for use with gcc
> > plugins that require code to be annotated.
> >
> > Thanks,
> > Taras
> Hm.  I wonder if it makes more sense to have a plugin hook for attribute
> processing?

On the whole I agree that we should let plugins register new attributes 
(whose table entries would get processed in init_attributes) rather than 
adding one attribute all plugins have to go through.  These attributes 
would then have all the flexibility of built-in attributes with regard to 
the different ways decl_attributes can process them.  If the plugin isn't 
loaded, they'd get a warning as for unknown attributes at present.

(At some point you might want plugin hooks similar to all the hooks for 
target attributes listed in tm.texi, but allowing a plugin to provide a 
table of attributes should give the basic functionality.)

Joseph S. Myers

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