Diego Novillo wrote:
Givenvoid 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?
I doubt you are using raw attributes in your code. They are likely hidden behind macros. At Mozilla we support a custom static analysis build configuration. Perhaps the correct solution would be for the plugin to define a new preprocessor variable, ie something akin to -DDEHYDRA.
Though I'm not sure how that would be a benefit over specifying -DDEHYDRA on the gcc commandline.
Taras _______________________________________________ dev-static-analysis mailing list [email protected] https://lists.mozilla.org/listinfo/dev-static-analysis
