4 ms·
Visual Studio is the only major C++ compiler that is inept at handling C. This is not unreasonable to expect proper C support and there is something terribly br
by dottrap 12y ago
Visual Studio is the only major C++ compiler that is inept at handling C. This is not unreasonable to expect proper C support and there is something terribly broken with Visual Studio in that they can't. Even Stroustrup has called for better compatibility with C.
- _delirium 12y agoI don't see any particular reason you'd expect a C++ compiler to handle C, except the very specific part of C (largely C89) that is a proper subset of the C++ standards. They're very different languages at this point. gcc's C++ compiler doesn't handle C past C89 either; you can't use C99 features when compiling with g++. There is a separate C compiler that's part of the GNU Compiler Collection, but then there's also a Fortran and a Go compiler: gcc includes a lot of languages. MSVC++ doesn't; it's just a C++ compiler, not a Fortran or Java or C compiler. Linux norms are a bit more polyglot, so gcc is more polyglot than MSVC++ is. I personally like C, so it'd be nice if Microsoft shipped a C compiler in addition to a C++ compiler, but they've chosen not to. As a result, the "C" you can write is precisely the C that is also valid C++, and you can't use any features that aren't valid C++. If you really want there to be a language "C/C++" again that all C++ compilers can be expected to handle, you'd have to convince the C++ standards committee to add C99 or C11 features to the next C++1x.