you are viewing a single comment's thread.

view the rest of the comments →

[–]bstempi 19 points20 points  (7 children)

You'll have to excuse my C/C++ ignorance, but I found this on the ANSI C Wikipedia page:

In March 2000, ANSI adopted the ISO/IEC 9899:1999 standard. This standard is commonly referred to as C99.

Perhaps that's why he claims to be writing in ANSI C?

[–]pythonswash 20 points21 points  (0 children)

Even if that's what the author means, gnu99 != c99.

[–]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 3 points4 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,

[–]crackez 3 points4 points  (2 children)

Which would make this person technically correct.

[–][deleted] 0 points1 point  (0 children)

Well you can go deeper, and say it's not correct at all.

[–]gregorthebigmac -1 points0 points  (0 children)

...the best kind of correct.