This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [plugins] Add user attribute(try #2)
- From: Diego Novillo <dnovillo at google dot com>
- To: Taras Glek <tglek at mozilla dot com>
- Cc: Le-Chun Wu <lcwu at google dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Guenther <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 May 2009 08:23:18 -0400
- Subject: Re: [plugins] Add user attribute(try #2)
- References: <49D25E40.6080507@mozilla.com> <84fc9c000904010146j53e49ed9i6c271751d41dfd42@mail.gmail.com> <Pine.LNX.4.64.0904011257550.14922@digraph.polyomino.org.uk> <49D398C9.1010809@mozilla.com> <82091ad70904021448y71547117q9fbd21cb8bd5b94d@mail.gmail.com> <49EFA543.8030602@mozilla.com>
On Wed, Apr 22, 2009 at 19:16, Taras Glek <tglek@mozilla.com> wrote:
> +void
> +register_attribute (const struct attribute_spec *attr)
> +{
Needs comment.
> --- a/gcc/gcc-plugin.h
> +++ b/gcc/gcc-plugin.h
> @@ -29,6 +29,7 @@ enum plugin_event
> PLUGIN_CXX_CP_PRE_GENERICIZE, /* Allows to see low level AST in C++ FE. */
> PLUGIN_FINISH, /* Called before GCC exits. */
> PLUGIN_INFO, /* Information about the plugin */
> + PLUGIN_ATTRIBUTES, /* Called during attribute registration */
Needs to be added to plugins.texi.
Also, could you add a testcase and documentation on how plugins
should use this mechanism?
Finally, the patch needs a ChangeLog entry.
Thanks. Diego.