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


Diego Novillo wrote:
On Wed, Apr 1, 2009 at 04:46, Richard Guenther
<richard.guenther@gmail.com> wrote:

Hm. I wonder if it makes more sense to have a plugin hook for attribute
processing?

The problem I see is that if the plugin is not loaded, then the attribute will trigger a syntax error. Instead the 'user' annotation will at least ignore the non-handled attribute.

I would tend to think that triggering an error, not a warning, for some unknown attribute is a mistake. It certainly means incompatibilitty with different versions of GCC. Perhaps attributes should be handled as (const or volatile) qualifiers: when something is wrong, GCC usually still generate some code and issue a warning (like eg warning: passing argument 1 of 'foo' discards qualifiers from pointer target type).


Regards.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


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