[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
Eh? I think there's some mixup somewhere. A C89 compiler is definately a C
compiler and not a C++ compiler. I don't think I said otherwise...?
What I said is that a C++ compiler is not a C compiler. Since C89 is
practically a subset of C++ (there are only a few minor differences), this
isn't an issue with C89 code, but it is an issue with C99 code, which can
contain constructs that are not standard C++.
I didn't. I said that a C++ compiler isn't a C compiler.
But maybe I didn't make myself clear: to the best of my knowledge, MSVC is
actually primarily a C++ compiler (despite the name), more than a plain C
compiler. Sure, it compiles C code, but any C++ compiler can compile C89
code.
If I'm wrong, please correct me.
MSVC is both C and C++ compiler.
There are important differences between C89 and C++, e.g. f() is f(void)
in C++ but not in C89.
And the MSVC C compiler is really C compiler, it even understands K&R C,
e.g. this code:
main() {
return f(3);
}
f(v)
int v;
{
return printf("%d", v);
}
compiles with MSVC 7.1 (.NET 2003) without any warning on default
warning level.
Clearly MSVC has full C compiler, it's not just C++ compiler.
--
Regards,
Michal
ICQ# 175762750