Last time I checked, saying that you are coding in ANSI C was equal to say "this is C99 compliant code with nothing else in it". Now with C11 and C++11, does this distinction still remain? Does it still has some sort of meaning?
Historically "ANSI C" was used to mean "standard C", i.e. C89, by contrast with "K&R C" and the various pre-standard variants invented by compiler-writers. That's why the 2nd Ed. of "The C Programming Language" has a big red "ANSI C" stamp on the cover.
Then for a time "ISO C" was used to mean "the new standard C", i.e. C99, by contrast with "ANSI C".
This was always a confusing usage, since both ISO and ANSI ratified both C89 and C99. ISO ratified the former as C90, and published it with some layout changes from ANSI's version but supposedly the same substantial content. So "ANSI C" always was an ISO standard, and "ISO C" always was an ANSI standard. The only difference was which body oversaw the standardization process.
Following this usage (and probably encouraging it to continue), the -ansi
flag to GCC is equivalent to -std=c90
. It that context it actually means "C90, plus some GNU extensions that do not conflict with the standard".
I'm not aware of "ANSI C" referring to C99, but that doesn't mean it hasn't been used to mean that.
I don't think that using the term "ANSI C" has helped anyone in the last 10 years. ANSI ratified C11, but it would not be helpful to start saying, "aha! well in that case, ANSI C suddenly now means C11!". We can certainly say that C11 is the current ANSI C standard, but nevertheless the term "ANSI C" can't be used with any reasonable expectation that people will clearly understand it to mean C11.
Both the ISO C11 and ISO C++11 have been ratified as the new ANSI C and C++ Standards.
For example, on my ANSI copy of C11 it is written:
Adopted by INCITS (InterNational Committee for Information Technology Standards) as an American National Standard. Date of ANSI Approval: 5/23/2012
Since currently1 3 different revisions of the C standard and "two and a half" of the C++ one are widely used, I'd say that such terminology today makes less sense than ever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With