How to use C89 with certain C99 features

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

 



Hi, everyone. I'm building a project in C. My idea is that I want it to be mostly C89, except that I will be using certain features of C99. What compiler flags do I need to tell GCC what I want?

At present, if I compile with -std=c99, I get no errors or warnings at all. If I compile with -std=c89, I get the following warnings:

(When I use macros with ... and __VA_ARGS__)
warning: anonymous variadic macros were introduced in C99

(When I use long string literals)
warning: string length '613' is greater than the length '509' ISO C90 compilers are required to support

(When I use vsnprintf)
warning: implicit declaration of function 'vsnprintf'

(When I initialize a struct with run-time data)
warning: initializer element is not computable at load time

Richard




[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