Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is the value of __STDC_VERSION__ in C11?

96 views
Skip to first unread message

Keith Thompson

unread,
Apr 10, 2012, 3:45:18 PM4/10/12
to
The latest C11 draft I have, n1570, says (in 6.10.8.1):

__STDC_VERSION__ The integer constant 201ymmL.

Obviously this is a placeholder, to be replaced with the actual
constant in the final standard. What is that constant?

(I can make an educated guess based on the actual release date,
but I'm looking for a definitive answer from someone who has a copy.)

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Keith Thompson

unread,
Apr 10, 2012, 3:50:20 PM4/10/12
to
Keith Thompson <ks...@mib.org> writes:
> The latest C11 draft I have, n1570, says (in 6.10.8.1):
>
> __STDC_VERSION__ The integer constant 201ymmL.
>
> Obviously this is a placeholder, to be replaced with the actual
> constant in the final standard. What is that constant?
>
> (I can make an educated guess based on the actual release date,
> but I'm looking for a definitive answer from someone who has a copy.)

I should have Googled before posting.

According to <http://stackoverflow.com/q/9294207/827263>, the
*intended* value is 201112L, and that's what the latest gcc uses with
"-std=c11".

But apparently the placeholder wasn't actually updated, and the
document submitted to ISO still has 201ymmL.

Jeroen Mostert

unread,
Apr 10, 2012, 5:51:53 PM4/10/12
to
On 2012-04-10 21:50, Keith Thompson wrote:
> Keith Thompson<ks...@mib.org> writes:
>> The latest C11 draft I have, n1570, says (in 6.10.8.1):
>>
>> __STDC_VERSION__ The integer constant 201ymmL.
>>
>> Obviously this is a placeholder, to be replaced with the actual
>> constant in the final standard. What is that constant?
>>
>> (I can make an educated guess based on the actual release date,
>> but I'm looking for a definitive answer from someone who has a copy.)
>
> I should have Googled before posting.
>
> According to<http://stackoverflow.com/q/9294207/827263>, the
> *intended* value is 201112L, and that's what the latest gcc uses with
> "-std=c11".
>
> But apparently the placeholder wasn't actually updated, and the
> document submitted to ISO still has 201ymmL.
>
Now I suppose we'll have to discuss if this means that "201ymmL" is an
integer constant by fiat (and what this means for conforming programs), or
if the standard has just dissolved in a puff of logic by blatantly
contradicting itself.

Perhaps the intent was to extend C with mixed Roman-Arabic numeral notation?
If Wikipedia is to be believed, "Y" was used in medieval times to stand for
"150". The lack of explicit semantics is troubling, but nothing we can't
work around...

--
J.

jacob navia

unread,
Apr 10, 2012, 6:12:14 PM4/10/12
to
Le 10/04/12 23:51, Jeroen Mostert a écrit :
> On 2012-04-10 21:50, Keith Thompson wrote:
>> Keith Thompson<ks...@mib.org> writes:
>>> The latest C11 draft I have, n1570, says (in 6.10.8.1):
>>>
>>> __STDC_VERSION__ The integer constant 201ymmL.
>>>
>>> Obviously this is a placeholder, to be replaced with the actual
>>> constant in the final standard. What is that constant?
>>>
>>> (I can make an educated guess based on the actual release date,
>>> but I'm looking for a definitive answer from someone who has a copy.)
>>
>> I should have Googled before posting.
>>
>> According to<http://stackoverflow.com/q/9294207/827263>, the
>> *intended* value is 201112L, and that's what the latest gcc uses with
>> "-std=c11".
>>
>> But apparently the placeholder wasn't actually updated, and the
>> document submitted to ISO still has 201ymmL.
>>
> Now I suppose we'll have to discuss if this means that "201ymmL" is an
> integer constant by fiat (and what this means for conforming programs),
> or if the standard has just dissolved in a puff of logic by blatantly
> contradicting itself.
>

:-)


> Perhaps the intent was to extend C with mixed Roman-Arabic numeral
> notation?

of course!

If Wikipedia is to be believed, "Y" was used in medieval times
> to stand for "150".

2250+MM --> 4250. That is the value of __STDC_VERSION__

Or is it
201+150+2000--> 2406

???



The lack of explicit semantics is troubling, but
> nothing we can't work around...
>

They were SO IN A HURRY to publish that stuff that they didn't even
proof read it?

lawrenc...@siemens.com

unread,
Apr 10, 2012, 7:56:00 PM4/10/12
to
Keith Thompson <ks...@mib.org> wrote:
> The latest C11 draft I have, n1570, says (in 6.10.8.1):
>
> __STDC_VERSION__ The integer constant 201ymmL.
>
> Obviously this is a placeholder, to be replaced with the actual
> constant in the final standard. What is that constant?

See DR 411: http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_411.htm
The committee is trying to get it approved as a TC as soon as possible.

C11's version of "Septermber". :-(
--
Larry Jones

Life's a lot more fun when you're not responsible for your actions. -- Calvin

lawrenc...@siemens.com

unread,
Apr 10, 2012, 7:59:44 PM4/10/12
to
jacob navia <ja...@spamsink.net> wrote:
>
> They were SO IN A HURRY to publish that stuff that they didn't even
> proof read it?

It got overlooked. ISO dragged their feet for a long time and then
suddenly decided they needed the document the next day.

(FWIW, I learn from my mistakes. Those magic numbers are now defined as
macros in the document header along with things like the page header and
footer formats rather than being in-line text in the document, so it's
obvious they need to be changed for publication.)
--
Larry Jones

Fortunately, that was our plan from the start. -- Calvin

Keith Thompson

unread,
Apr 10, 2012, 9:09:39 PM4/10/12
to
lawrenc...@siemens.com writes:
> Keith Thompson <ks...@mib.org> wrote:
>> The latest C11 draft I have, n1570, says (in 6.10.8.1):
>>
>> __STDC_VERSION__ The integer constant 201ymmL.
>>
>> Obviously this is a placeholder, to be replaced with the actual
>> constant in the final standard. What is that constant?
>
> See DR 411: http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_411.htm
> The committee is trying to get it approved as a TC as soon as possible.
>
> C11's version of "Septermber". :-(

| The committee asked the Convener to look into making this an errata if
| possible.

s/errata/erratum/

http://rationalwiki.org/wiki/Skitt's_Law

lawrenc...@siemens.com

unread,
Apr 11, 2012, 9:47:34 PM4/11/12
to
Keith Thompson <ks...@mib.org> wrote:
>
> | The committee asked the Convener to look into making this an errata if
> | possible.
>
> s/errata/erratum/

I didn't write that part of the DR. :-)
--
Larry Jones

I thought my life would seem more interesting with a musical
score and a laugh track. -- Calvin
0 new messages