4 ms·
How would supporting both C++ and C standards be incompatible ? Every other major C/C++ compiler can do it (intel, clang, gcc, sun studio, etc…). Implementing m
by cdavid 14y ago
How would supporting both C++ and C standards be incompatible ? Every other major C/C++ compiler can do it (intel, clang, gcc, sun studio, etc…). Implementing most of the C99 features is ridiculously easy compared to C++11 (C-compatible complex numbers, C99 semantics for inline, etc…).
The sheer amount of code that can be compiled on every platform but VS because of this is very significant, especially open source ones. I have a hard time buying the resource reason to be honest.
- bunderbunder 14y agoThe sheer amount of code that can be compiled on every platform but VS because of this is. . . . . . not actually very much. Visual Studio can use Intel's compiler, and perhaps others.
- cpeterso 14y ago> The sheer amount of code that can be compiled on every platform but VS because of this is very significant, especially open source ones. Mission accomplished.
- cube13 14y agoGCC and Sun Studio offer different compilers for C and C++. You can compile C code with Sun Studio's CC, but normally you would use cc for C code.
- bunderbunder 14y agoThe others, too. llvm, gcc, and icc all support both C and C++. But they also support Fortran using the same technique: A separate compiler front-end for each language. For VC++ to add support for C as easily as many compiler collections do would require VC++ having a modular architecture like that of the other compiler collections. Considering VC++ only supports one language, that seems doubtful.
- someone-else 14y agoIt already supports C. They're just not updating the version, leaving it stuck in C89 mode.
- bunderbunder 14y agoTouche. Perhaps I should have said "Supporting versions of C past the point where one could plausibly just pipe the C code through a C++ compiler."
- adgar 14y ago> Perhaps I should have said "Supporting versions of C past the point where one could plausibly just pipe the C code through a C++ compiler." Like supporting for-loop variable declarations, which MSVC's C++ compilation mode (/TP) supports, but MSVC's C compilation mode (/TC) does not? Oh - and what about declaring a variable anywhere other than the start of a scope? Allowed in C++, not in C. Cute.