Re: Using __STDC_VERSION__ macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2 February 2017 at 13:48, Vincent Lefevre wrote:
> However, it yields false positives on code that doesn't contain any
> ambiguity (and is easier to read than lengthier code), such as:
>
> #if __STDC_VERSION__ < 199901L
>
> Since __STDC_VERSION__ is a standard macro, it is quite obvious that
> even if __STDC_VERSION__ is not defined, this is not a typo. So, IMHO,
> -Wundef should whitelist some common macros (and/or perhaps let the
> user provide his own whitelist).

Yes, it seems reasonable to not warn for __STDC_VERSION__ in C89 mode.

If you spell it wrong it won't match the whitelist and so you'll still
get a warning.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux