From 9185576878598737711
X-Google-Thread: f78e5,59c47fe3b9dfca8e
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: stephan.bergmann@sun.com (Stephan Bergmann)
Newsgroups: comp.std.c++
Subject: Re: UCNs in phase 1
Date: Mon, 24 Jan 2005 18:17:48 GMT
Organization: Sun Microsystems
Lines: 36
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <ct2f6n$ejf$1@new-usenet.uk.sun.com>
References: <1106212184.380589.161860@z14g2000cwz.googlegroups.com> <1106313530.204408.11090@z14g2000cwz.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1106590674 7286 158.152.254.254 (24 Jan 2005 18:17:54 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Mon, 24 Jan 2005 18:17:54 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
X-Accept-Language: en-us, en
X-Virus-Scanned: by amavisd-new at cs.mu.OZ.AU
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id j0OIHm0k017676;
	Tue, 25 Jan 2005 05:17:48 +1100 (EST)
X-NNTP-Posting-Date: 24 Jan 2005 09:29:59 GMT
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:3949

msalters wrote:
> neil@daikokuya.co.uk wrote:
> 
>>In view of lex.phases paragraph 1, given a translation unit
>>
>>#define str(x) #x
>>char array[] = str($);
>>
>>what characters should array[] contain?
> 
> 
> $ isn't in the set of supported characters, so anything would be legal.
> (2.2/1 The basic source character set ). An error would be legal as
> well,
> in fact I think a diagnostic is required.

Oh, yes, you are probably right:  If $ is translated in phase 1 to 
\u0024 or \U00000024, then it is translated in phase 3 to an identifier 
preprocessing-token, which is malformed, as "Each 
universal-character-name in an identifier shall designate a character 
whose encoding in ISO 10646 falls into one of the ranges specified in 
Annex E." [2.10/1]

However, if $ is translated in phase 1 to \u00c0...

-Stephan

> Regards,
> Michiel Salters

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



