Posted on

c 99

C 99

There is a LOT of existing code out there that is valid C but is not valid C++. That code is not likely to be rewritten (. )

The inline keyword behaves differently, you can choose which translation unit gets a non-inline version of a function declared inline by adding an extern declaration to that unit.
This question was triggered by replie(s) to a post by Herb Sutter where he explained MS’s decision to not support/make a C99 compiler but just go with the C(99) features that are in the C++(11) standard anyway.

Quick links: External resources from the answers:
Anonymous structures and unions (C11, but GCC extension since forever) (anonymous unions are apparently in C++03, no MSVC support in C mode):
An example for this would be the linkage of const objects or inline functions.
While C++11 and C11 got closer on some fronts (variadic macros are now available in C++, variable-length arrays are now an optional C language feature), the list of incompatibilities has grown as well (eg generic selections in C and the auto type-specifier in C++).
There are a bunch of incompatibilities that have been around for ages (C90 or earlier), as well as a bunch of really nice features in C99 and C11. These are all off the top of my head.

(. ) C is important and deserves at least a little bit of attention.

What are the incompatible differences between C(99) and C++(11)? This question was triggered by replie(s) to a post by Herb Sutter where he explained MS’s decision to not support/make a C99