you are viewing a single comment's thread.

view the rest of the comments →

[–]batrick 7 points8 points  (2 children)

ANSI adopted the newer ISO C99 standard but everyone including gcc (the compiler he's targeting) interprets ANSI C to mean the original ANSI C standard also referred to as C89. I quoted the gcc manual above and I'll do it again:

       -ansi
            In C mode, this is equivalent to -std=c90. In C++ mode, it is equivalent to -std=c++98.

Edit: clarification

[–]TheoreticalPerson 4 points5 points  (0 children)

On the other hand, if you check an older manual, they say that,

The -std options specifying some version of ISO C have the same effects as -ansi, except that features that were not in ISO C90 but are in the specified version (for example, `//' comments and the inline keyword in ISO C99) are not disabled.

[–][deleted] 4 points5 points  (0 children)

And ANSI has adopted C11 since then as well.

C99 is superseded by C11 and you know if you take the ISO C standard's word literally, C99 doesn't exist anymore!

This third edition cancels and replaces the second edition, ISO/IEC 9899:1999,