4 ms·
Note: -ansi is equivalent to -std=c90 (in C mode). If you want C99 or C11 support, use -std=c99 or -std=c11.
by epsylon 13y ago
Note: -ansi is equivalent to -std=c90 (in C mode).
If you want C99 or C11 support, use -std=c99 or -std=c11.
- stephencanon 13y ago-ansi is one of the most poorly named compiler flags of all time; C11 is the current ANSI C standard, but compiling with -ansi in GCC specifies a language dialect that’s a quarter of a century old(!)
- dllthomas 13y agoIt was named when "ANSI or not ANSI?" was the interesting question, and stuck around for compatibility. It should be kept and its semantics should not be changed, but it should be called out as deprecated. At least the gcc man page does say "In C mode, this is equivalent to -std=c90. In C++ mode, it is equivalent to -std=c++98."
- thinkpad20 13y agoTrue, but colloquially, when people say "ansi C" they almost always mean C89.
- klodolph 13y agoTrue, but when people say "ansi C", then Clinton is almost always president. (I say this because these days, I hear "C89" or "C90", "C99", or "C11". People who say "ANSI" get asked for clarification.)