Live data from Hacker News

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

herbsutter.com

31–40 of 53 posts

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

#32

Earlier quoted context omitted.

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

Drop the -ansi flag, which enables C90 mode...

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

#33

Earlier quoted context omitted.

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.

You say that like they are removing all C support. Unless that "legacy" code suddenly mutates to use C99 features that aren't in C++, it'll still compile in the future.

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

#34
post #22

Earlier quoted context omitted.

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.

It already supports C. They're just not updating the version, leaving it stuck in C89 mode.

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

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

They can get away with it because C has an ABI, so cygwin + gcc -mno-cygwin can build binaries that interoperate with Visual Studio's libc. Lots of open source projects build their Windows distributions this way - GTK for example has been doing it for about 10 years now.

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

#36

Earlier quoted context omitted.

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.

Right but not a lot of C99 code, hence the indefinite C90 support.

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

#37
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…

It seems like kind of a self-fulfilling prophecy at this point. VS's dialect of C is literally more than two decades out of date at this point. Let your C compiler stagnate that long, and C developers will migrate to alternatives, leaving you with a C++-centric audience of your own making. I don't know if that's what happened, but evidently C was important enough at one point for them to support it.

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

#38

Earlier quoted context omitted.

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.

It already supports C. They're just not updating the version, leaving it stuck in C89 mode.

Touche.

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

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

#39
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?

In particular, C++98 and C99 was when C and C++ began to split, and obviously MS chose to implement C++98 instead of C99.

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

#40
post #33

Earlier quoted context omitted.

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

You say that like they are removing all C support. Unless that "legacy" code suddenly mutates to use C99 features that aren't in C++, it'll still compile in the future.

But will never be updated to include C99 features. Exactly.
Post reply on HN