C99 - Version Detection

Version Detection

A standard macro __STDC_VERSION__ is defined with value 199901L to indicate that C99 support is available. As with the __STDC__ macro for C90, __STDC_VERSION__ can be used to write code that will compile differently for C90 and C99 compilers, as in this example that ensures that inline is available in either case (by replacing it with static in C90 to avoid linker errors.)

#if __STDC_VERSION__ >= 199901L /* "inline" is a keyword */ #else # define inline static #endif

Read more about this topic:  C99

Famous quotes containing the word version:

    If the only new thing we have to offer is an improved version of the past, then today can only be inferior to yesterday. Hypnotised by images of the past, we risk losing all capacity for creative change.
    Robert Hewison (b. 1943)