Live data from Hacker News

Herb Sutter confirms no more support for C beyond C90 in Visual C++

herbsutter.com

21–30 of 53 posts

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#21
post #14

Earlier quoted context omitted.

They are going to conform to a standard. The C++11 standard. Conforming to the later C standards and the C++11 standard would be incompatible goals.

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 on…

> 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.

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#22
post #14

Earlier quoted context omitted.

They are going to conform to a standard. The C++11 standard. Conforming to the later C standards and the C++11 standard would be incompatible goals.

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 on…

GCC 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.

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#23
post #15

I'm unsurprised, but still, goddamnit guys. As one of the comments in the linked page points out, the problem with more modern C code is that it tends to be covered in GCC gunk. Without Microsoft implementing support, well, that won't get better. Maybe one day Clang on Windows will be far enough along that Microsoft will let you use it as a VS backend.

That would not solve that problem. http://clang.llvm.org/docs/LanguageExtensions.html : "Clang aims to support a broad range of GCC extensions."

Well shit. :(

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#25
post #16
post #11

I'm seeing a lot of negativity here that I don't understand. The post seemed fairly well-reasoned and reasonable; the objections seem to assume that the content of the objection should be obvious. It's not obvious to me---C++ is not a superset of C, and hasn't been for some time now, although there remains a lot of overlap and cross-pollination. So why shouldn't a C++ compiler decide to just be a C++ compiler?

I don't think there's anything wrong with having a dedicated C++ compiler. But it seems fairly crazy to me for Microsoft not to have a C compiler that's even remotely up to date. C is still an important language, and "just compile it as C++" is not a good answer.

C is a very important language, but not so much among Visual Studio's target market. Windows developers tend to be rather C++-centric, and I'm guessing the biggest reason why the compiler team hasn't bothered is because there just isn't sufficient demand to justify the diversion of resources.

I'm also guessing a lot of the world's C99 code has dependencies beyond the just the compiler that Visual Studio won't support without some effort. "Just compile it as C++" is not a good answer, but I wouldn't be surprised if "just install Cygwin" often is.

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#26
post #18

Earlier quoted context omitted.

They are going to conform to a standard. The C++11 standard. Conforming to the later C standards and the C++11 standard would be incompatible goals.

You do know that C and C++ are separate languages, right?

Of course I do. Doesn't the post make it clear as day? C++11 and C11 are different standards, as stated.

Any C++11 compiler that tells you it is also C11 standards compliant is not a C++11 compliant compiler. There are many things you can do with C11 that should cause an error under standards compliant C++11.

EDIT:

If they decide to make the /TP switch on the compiler turn it from C++11 compliant to C11 compliant, that basically makes it two compilers for two different languages, instead of restricting to a subset of C++11.

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#27
post #22
post #14

Earlier quoted context omitted.

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 on…

GCC 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.

The 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.

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#29
post #15

Earlier quoted context omitted.

That would not solve that problem. http://clang.llvm.org/docs/LanguageExtensions.html : "Clang aims to support a broad range of GCC extensions."

Well shit. :(

There's always

  -ansi -pedantic -std=c99
I actually find some of the GCC extensions quite nice for correctness. I assume #defines that expand to nothing on other compilers still class as "GCC gunk" though. :-)

Re: Herb Sutter confirms no more support for C beyond C90 in Visual C++

#30
post #16

Earlier quoted context omitted.

I don't think there's anything wrong with having a dedicated C++ compiler. But it seems fairly crazy to me for Microsoft not to have a C compiler that's even remotely up to date. C is still an important language, and "just compile it as C++" is not a good answer.

C is a very important language, but not so much among Visual Studio's target market. Windows developers tend to be rather C++-centric, and I'm guessing the biggest reason why the compiler team hasn't bothered is because there just isn't sufficient demand to justify the diversion of resources. I'm also guessing a lot of the world's C99 code has dependencies beyond the just the compiler that Visual Studio won't support…

There's still a ton of C legacy code running on windows machines out there.
Post reply on HN