Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Cake - C23 to C99 transpiler Date: Wed, 14 Sep 2022 06:45:44 -0700 Organization: A noiseless patient Spider Lines: 34 Message-ID: <86y1umm5mf.fsf@linuxsc.com> References: <836c6515-87f5-42b2-98b0-8308173a9120n@googlegroups.com> <8735d39ou5.fsf@bsb.me.uk> <87leqv87t2.fsf@bsb.me.uk> <878rmv810h.fsf@bsb.me.uk> <8735d3kk1p.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="e4a07c6eb40a7dcf36ed28254bbf399a"; logging-data="3128046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+K0QuqnTVlOc0PrmWMJrWxh3xJCuhS0/k=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:Xhn5zzu8YAALt2kZ2uRMKROoEBc= sha1:ytFH/+9pEfIsX/PALWZY0blPK7A= Xref: csiph.com comp.lang.c:167709 Keith Thompson writes: > Ben Bacarisse writes: > >> David Brown writes: >> >>> I believe (but I might have this wrong) that the use of dollar signs >>> in identifiers is undefined behaviour according to the standard. >> >> I don't think it's undefined. Recent C drafts permit "other >> implementation defined characters" in the syntax, so I'm not sure how it >> could be undefined. > > Right. So if the implementation defines identifier-nondigit to include > '$', then using '$' in an identifier is well defined; if it doesn't, > it's simply a syntax error. > >> The C23 draft permits an XID_Start character followed by XID_Continue >> characters. These may, in fact, include $ but I got lost down the >> rabbit hole of referenced standards so I can't be sure. > > I don't believe '$' is included in XID_Start or XID_Continue, but I'm > not 100% certain of that. > > https://unicode.org/reports/tr31/ > https://unicode.org/reports/tr44/ In addition to these documents I have done some web searching, and I think the evidence is pretty strong that neither '$' nor '@' is in XID_Start or XID_Continue, as the Unicode documentation details them. Editorial comment: the two Unicode reference documents may be the very worst reference documentation I have ever read.