Path: csiph.com!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: curiosity about compiler phases Date: Fri, 22 Nov 2019 21:25:00 -0800 Organization: None to speak of Lines: 29 Message-ID: References: <9585199f-546a-46f8-ac2a-de27cc08a3f5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="dfad491d1778b0c95e43bf538d0f4f21"; logging-data="14872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KSbQ25SLBdlobZVrj09G+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:JFIqzVryW6t0KdHIlgqlx8XrTlM= sha1:C77j9mthYHchVYspwbPEPhqKyN8= Xref: csiph.com comp.lang.c:148134 Bart writes: [...] > Every so often you come across crazy things that C allows in its > preprocessor; this is one of them. Not just being able to split up lines > between tokens, but even in the middle of tokens! What you call crazy, I call simple. Backslash-newline sequences are spliced in translation phase 2. Preprocessing tokens aren't recognized until phase 3 (and preprocessing tokens aren't converted into tokens until phase 7). Of course a compiler isn't required to implement the 8 translation phases explicitly, but a conforming compiler must behave as if it did. You've simply discovered another way in which it's possible to do ugly things in C. There is no language in which it isn't possible to do ugly things. "Doctor, my code is ugly when I do this!" If your C compiler doesn't implement this as the standard requires, then there could be standard-conforming C code that your compiler can't handle. To be clear, that doesn't bother me. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */