Hacker News new | ask | show | jobs
by unwind 4478 days ago
Very surprising to not see the -std option to actually clarify which language standard is being used. Perhaps that isn't as important in C++ as it is in C.
3 comments

The -ansi switch is used, and imply -std=c90 for C and -std=c++98 for C++. But an explicit -std might be better, I suppose.
Is there a way to specify C89 but use the C99 style comments (i.e. //)?
I believe that -std=gnu89 should give you C89 with that particular extension (and some others).
Agreed, see my post above about -std=c99.