Possible Duplicate:
What issues can I expect compiling C code with a C++ compiler?
Just curious whether I could make use of a c++ compiler to compile c source code??Anyway is there any compiler that fully support c99 standard yet??
You might have a problem compiling C code with a C++ compiler unless you explicitly restrict the compiler to use C (which all the C++ know how to do). If the compiler uses C++ to compile C code you might have issues if in the C code you use words that are reserved in C++.
For example, C code like this:
int main(void) { int class = 5; return class;}
Will compile fine with a C compiler (or C++ compiler in C mode), but will not compile with a C++ compiler.
C++ is not a superset of C. There are places where they differ, which means some C code will not compile in C++ mode.
As for C99 support, GCC and Clang are the closest. Microsoft does not support C99, and only focuses on C++ (which overlaps with C99 in places).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With