On Sat, Jun 09, 2018 at 12:50:03AM +0100, Ramsay Jones wrote: > On 08/06/18 21:26, Luc Van Oostenryck wrote: > > diff --git a/lib.h b/lib.h > > index 0e5f3e4a8..44b2fb020 100644 > > --- a/lib.h > > +++ b/lib.h > > @@ -89,25 +89,21 @@ struct token *expect(struct token *, int, const char *); > > void unexpected(struct token *, const char *errmsg); > > > > #ifdef __GNUC__ > > -#define FORMAT_ATTR(pos) __attribute__ ((__format__ (__printf__, pos, pos+1))) > > -#define NORETURN_ATTR __attribute__ ((__noreturn__)) > > -#define SENTINEL_ATTR __attribute__ ((__sentinel__)) > > +#define __printf(pos) __attribute__((__format__(__printf__, pos, pos+1))) > > +#define __noreturn __attribute__((__noreturn__)) > > +#define __sentinel __attribute__((__sentinel__)) > > __printf, __noreturn and __sentinel are all reserved identifiers > and should not be used (C99 7.1.3). [The situation in the kernel, > or an embedded (non-hosted) platform is a different issue.] > > Yes, I know that there are already some such symbols in sparse. > That is no reason to add more! ;-) You're totally right. I had, indeed, forgot I was in the standard user-space environment. > [I suspect that some people will disagree, saying that I'm just > an old curmudgeon! Well, OK. :) ] > > Perhaps just removing the '_ATTR' part of the symbol would be > sufficient. ie. FORMAT(pos), NORETURN and SENTINEL. They're ugly as hell but well ... Yes, but I'll use PRINTF instead of FORMAT as the format attribute is not printf-specific. Thanks again for your vigilance! -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html