Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: list of chars to introduce in future c Date: Thu, 14 Feb 2019 12:20:11 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <8b6a2c57-8c85-40ef-9c8a-0f77ab380586@googlegroups.com> <1ac84a88-8234-4058-ae55-3ee6cc84284e@googlegroups.com> <1821988a-0e14-429c-ad7e-bdd0b384ff06@googlegroups.com> <9de4abd4-6fa5-431f-b2c0-e6f169210d72@googlegroups.com> <25ce3677-f2fd-4d61-93e3-a15b662b6ab8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="7abae82b86b742dc3dc12a67ad2e28f4"; logging-data="19046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/K7iIHJJXgdlbeUgn17o1M" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:v3DHV9vNJQp7o7ZHN1nEJFiubl8= sha1:XrOrmsbInnFaA2XF2WcZBYsLDGI= Xref: csiph.com comp.lang.c:141042 David Brown writes: [...] > Making the minus sign part of the integer or floating point constant > does not require a new symbol - it would just need a tweak in the > lexical parsing rules. It would need a fairly major tweak if we want to avoid breaking existing code. In all current versions of C, `1-1` consists of three tokens and parses as an additive-expression. If `-1` were a single token, maximal munch implies that `1-1` would consist of two tokens (and woud produce a syntax error). You could add rules for disambiguating whether `-1` is a negative constant or a `-` followed by `1`, but the rules would have to depend on the current parsing state, not just on the current lexical state. (A similar problem led to the pre-ANSI change from `=-` to `-=`.) Incidentally, I've found that fir's contributions to this newsgroup are mostly noise, so I never see his posts. I suggest that responding to his posts merely adds more noise. I ask you to curb your impulse to feed the trolls. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */