|[3 earlier articles]|
|Re: Strange C constructs email@example.com (Jeremy Yallop) (2004-02-27)|
|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)|
|Date:||6 Mar 2004 13:44:11 -0500|
|Posted-Date:||06 Mar 2004 13:44:11 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
> 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.
It is, however, possible to run a C preprocessor as an independent
program, and thereby use it for other languages. I don't believe the
standard either explicitly permits or prohibits this. :) In that case,
bizarre constructs like the above might conceivably be useful.
Return to the
Search the comp.compilers archives again.