-
Weird Warning
Hey,
What the hell does this warning mean? Its confusing me as to why it would say its a warning...
mud.h:1:1: warning: C++ style comments are not allowed in ISO C89
mud.h:1:1: warning: (this will be reported only once per input file)
Any explination of why this occured would be most helpfull, it spams the hell outa my terminal when I'm trying to work bugs out.
Thanks,
Jase
-
C++ style comments, double slashes (IE, //) are not allowed in older C89 code, but they are acceptable in C99.
-
-hmm-
So how can I tell which one I'm using? I mean obviousley I'm using C89, but is it due to the compiler, or my code?
-
It's the combination of using // in a C89 compiler (or at least, one that is issuing warnings about it).
You can either
A. Change every // comment to /* */
B. Find the compiler flag to turn off the warnings
C. Just let them spam your screen.
-
Ah, figured as much. I've already begun looking for the flag, I'm programming under linux-gnu, using gcc. Thanks for the help.
-
why not use the g++ compiler (that is if your using red hat)