This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor bug: @ + MACRO does not work in gcc-3.0
- To: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Subject: Re: preprocessor bug: @ + MACRO does not work in gcc-3.0
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Mon, 5 Mar 2001 20:15:41 +0000
- Cc: Nicola Pero <n dot pero at mi dot flashnet dot it>, gcc-bugs at gcc dot gnu dot org,Zack Weinberg <zackw at Stanford dot EDU>
- References: <20010305190404.C26596@daikokuya.demon.co.uk> <200103051959.LAA23018@orion.nsr.hp.com>
Ovidiu Predescu wrote:-
> The @ symbol is actually part of the Objective-C language, it's used
> to create Objective-C constant string objects. So there is nothing to
> fix in GNUstep, it is simply making use of a feature in the language.
You seem to be saying that "@" is a separate token, and should be treated
as such in the preprocessor. Is that what you mean? That means that
the front end needs to be changed to treat them as separate tokens, too.
> One more thing about the @ syntax, it also allows for things like
> this:
>
> id string = @"this is "
> @"a long "
> @"string.";
>
> The value of `string' is equivalent as if it was declared with:
>
> id string = @"this is a long string.";
>
> the compiler effectively concatenating the strings together.
Right, but we already get that right (I think), because that's done
in the front ends (at present at least) which see CPP_OSTRING tokens.
Neil.