jacob navia said:
Le 29/12/10 13:55, Francois Grieu a écrit :
There are also some preliminary drafts of the
upcoming C201X standard available. I think the latest is
[n1516] though I could have missed a more recent one.
Latest seems to be n1547, made 2010-12-02, posted 2010-12-03
<
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1547.pdf>
I wonder what are the C99 features made non-mandatory in C201x,
as hinted by "Major changes from the previous edition include:
— conditional (optional) features (including some that were
previously mandatory)"
See n1547 section 6.10.8.3, "Conditional feature macros".
Microsoft decided that automatically allocated tables were
unnecessary.
int fn(int n)
{
in table[n];
}
This feature of C99 is now optional thanks to (who else
could have done that!) Plauger/Microsoft
What makes you think Microsoft was responsible for this? I'm not
saying you're wrong, I'm just interested in seeing some hard
evidence. Microsoft apparently has (had?) no plans to support
even C99; I wonder why they'd have so much influence over C201X.
For those who don't want to download n1547.pdf, the list of conditional
feature macros is:
__STDC_ANALYZABLE__
The integer constant 1, intended to indicate conformance to
the specifications in annex L (Analyzability).
__STDC_IEC_559__
The integer constant 1, intended to indicate conformance
to the specifications in annex F (IEC 60559 floating-point
arithmetic).
__STDC_IEC_559_COMPLEX__
The integer constant 1, intended to indicate adherence to
the specifications in annex G (IEC 60559 compatible complex
arithmetic).
__STDC_LIB_EXT1__
The integer constant 201ymmL, intended to indicate support
for the extensions defined in annex K (Bounds-checking
interfaces).
__STDC_NO_COMPLEX__
The integer constant 1, intended to indicate that the
implementation does not support complex types or the
<complex.h> header.
__STDC_NO_THREADS__
The integer constant 1, intended to indicate that the
implementation does not support atomic types (including the
_Atomic type qualifier and the <stdatomic.h> header) or the
<threads.h> header.
__STDC_NO_VLA__
The integer constant 1, intended to indicate that the
implementation does not support variable length arrays or
variably modified types.
Of these, __STDC_NO_COMPLEX__ and __STDC_NO_VLA__ make existing
mandatory C99 features optional in C201X. Personally, I don't see
the point of either of these. They might save some relatively small
amount of work for implementers, but I don't see that they do any
good for programmers; neither feature should impose any significant
overhead on programs that don't use it.