Y
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
xroche
4478 days ago
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.
link
cliveowen
4478 days ago
Is there a way to specify C89 but use the C99 style comments (i.e. //)?
link
mpyne
4478 days ago
I believe that -std=gnu89 should give you C89 with that particular extension (and some others).
link
fexl
4478 days ago
Agreed, see my post above about -std=c99.
link