|[4 earlier articles]|
|Re: Strange C constructs firstname.lastname@example.org (Alex Colvin) (2004-02-27)|
|Re: Strange C constructs derek@NOSPAMknosof.co.uk (Derek M Jones) (2004-03-02)|
|Re: Strange C constructs email@example.com (Dave Thompson) (2004-03-02)|
|Re: Strange C constructs firstname.lastname@example.org (2004-03-02)|
|Re: Strange C constructs email@example.com (Victor Zverovich) (2004-03-02)|
|Re: Strange C constructs RLake@oxfam.org.pe (2004-03-06)|
|Re: Strange C constructs firstname.lastname@example.org (2004-03-11)|
|From:||email@example.com (Nick Maclaren)|
|Date:||11 Mar 2004 12:45:51 -0500|
|Organization:||University of Cambridge, England|
|References:||04-02-147 04-03-019 04-03-022|
|Posted-Date:||11 Mar 2004 12:45:51 EST|
>> The newest C99 standard introduces single line comments (//...), but
>> it can be formed in such a way using macro substitution and glueing.
> ^not I think you meant to say
I hope so :-)
>> It is shown in the following example stolen from the standard:
>> #define glue(x,y) x##y
>> glue(/,/) k(); // syntax error, not comment
>> K&R and previous C standard doesn't have such type of comment.
>> So this code (AFAIK it is located in WTypes.h) is completely illegal
>> in C and intended for use with brain-damadged Microsoft compilers.
Yes and no. 'K&R C' was a very broad church, and there were lots of
variations (which was part of the difficulty in defining C90); because
that comment form existed in BCPL, I will bet that at least one such
compiler supported it! Also, it is perfectly permissible to allow
syntactic extensions in C90 and C99 compilers if they issue a warning
about extensions being used.
Return to the
Search the comp.compilers archives again.