Menu

#3 parse gcc attribute tags (wish)

open
nobody
None
5
2002-02-18
2002-02-18
No

I can express to gcc that a function parameter is
unused using __attribute__((unused)), and would like
for splint to recognize those annotations as well.

The attribute for variables is defined in a section of
the gcc manual entitled:
Specifying Attributes of Variables

The attribute syntax can also be used to declare the
equivalent of /*@printflike@*/.

An example function with both annotations is:

static int periodic(/*@unused@*/ void *dummy
__attribute__((unused))) {

it would be great to not have to include /*@unused@*/ in
the above. perhaps this can be solved with a clever
preprocessor trick.

obviously, this is a wishlist item.
thanks,
-neil

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.