[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: MODIFIED: include ...

From: Branko Èibej <brane_at_xbc.nu>
Date: 2001-05-22 20:48:13 CEST

Karl Fogel wrote:

>joe@tigris.org writes:
>
>> Log:
>> * svn_types.h: Don't use ## when concatenating string tokens.
>>
>
>Thanks, Joe! I took another look at K&R, and learned why the ## was
>unnecessary for this simple case.
>

It's not unnecessary, it's simply wrong. The concatenated result must be
a valid preprocessing token, which "a""b" is not.Preprocessing tokens
are parsed in translation phase 3, and string literals aren't
concatenated till phase 6. See 5.1.1.2, 6.4p1 and 6.10.3.3p3 in the C
standard.

Ahh, it feels so good to be a language lawyer! :-)

-- 
Brane �ibej
    home:   <brane_at_xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej_at_hermes.si>   http://www.hermes-softlab.com/
     ACM:   <brane_at_acm.org>            http://www.acm.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.