Dealing with warnings on __attribute__((user)) when dehydra is not loaded

Diego Novillo dnovillo@google.com
Fri Oct 16 13:33:00 GMT 2009


Given

void foo(void) __attribute__((user("bleh")));

GCC will complain

foo.cc:1: warning: 'user' attribute directive ignored

whenever dehydra is not loaded.  Since our build system uses -Werror
for every build, users are not really able to use this attribute in
their dehydra scripts.  Has anyone run into this?  I have suggested
guarding the attribute with a special macro and define that macro
every time they use dehydra, but that's awkward.

We could change the compiler to never complain about the 'user'
attribute, unless plugins are loaded,but that also seems incomplete.

Compiling with -Wno-attributes helps, but that turns off all
attributes.  Perhaps we could control warnings on the 'user' attribute
with a new -Wuser-attribute?


Thanks.  Diego.



More information about the Gcc mailing list