I'm using GCC 4.3.3 on Ubuntu 9.04 64-bit and was getting errors using C++-style comments in C code. When I say "by default" in the title, I mean simply invoking gcc test.c
According to the GCC 4.3.3 docs (here), this is supported...yet I got the errors anyway.
These errors went away with a simple -std=c99 addition to my compile string, so my problem is solved. Curious if any GCC experts out there had an explanation for this, as it seems to me to be a clear contradiction to the documentation.
#include <stdio.h>
// this is a comment
int main( void )
{
return 0;
}