List of reserved words

Alex Rønne Petersen alex at lycus.org
Thu Oct 11 13:45:35 PDT 2012


On 11-10-2012 20:55, Ali Çehreli wrote:
> On 10/11/2012 11:52 AM, Alex Rønne Petersen wrote:
>> On 11-10-2012 20:41, Maxim Fomin wrote:
>>> On Thursday, 11 October 2012 at 18:20:27 UTC, monarch_dodra wrote:
>>>> In C, *technically*, anything ending in _t is reserved for future
>>>> usage, but this is not enforced.
>>>
>>> Where this is claimed?
>>>
>>>
>>
>> 6.10.7.2:
>>
>> None of these macro names, nor the identifier defined, shall be the
>> subject of a #define or a #undef preprocessing directive. Any other
>> predefined macro names shall begin with a leading underscore followed by
>> an uppercase letter or a second underscore.
>>
>> So, it's not explicitly reserved, but your code can suddenly start doing
>> weird things if you prefix an identifier with an underscore.
>>
>> This is why new keywords/types are named like _Noreturn, _Thread_local,
>> etc.
>>
>
> I am sure Maxim knows about the "leading underscore" case. I think
> that's why "anything ending in _t" is being questioned. :)
>
> I would like to know that too. I have never heard that names ending with
> _t are reserved in C or C++.
>
> Ali

Aaah, my bad. I somehow completely missed the _t.

Disregard me!

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list