Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
| Newsgroups | comp.std.c |
| Subject | Re: Adjacent string literals |
| Date | Sat, 10 Jul 2021 08:49:07 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 31 |
| Message-ID | <86v95i88zw.fsf@linuxsc.com> (permalink) |
| References | <rumnae$4mr$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | reader02.eternal-september.org; posting-host="e13df7ffef68eec8a0b0a92150d2f271"; logging-data="2695"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cJoRL4JPT+kOWhLJeMNRvQaeKVeNMnvk=" |
| User-Agent | Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) |
| Cancel-Lock | sha1:2isv4NA80KtUI5ctOaYyRmtenbQ= sha1:iqd0fdsqvs+x+q/hDHdNZzlhx7M= |
| Xref | csiph.com comp.std.c:6264 |
Show key headers only | View raw
James Kuyper <jameskuyper@alumni.caltech.edu> writes: > I learned a couple of decades ago that adjacent string literals get > concatenated into a single longer literal, even if separated by > arbitrarily large amounts of white-space. > > Yesterday I happened to notice that translation phase 6 says only that > "Adjacent string literal tokens are concatenated.", without saying > anything about white-space. White-space doesn't lose it's significance > until translation phase 7. Therefore, string literals that are separated > by white-space do not qualify as adjacent. There's also no mention of > white-space in the fuller discussion that occurs in 6.4.5p5. > > Am I missing something obvious here? I can imagine someone telling me > that "adjacent" should be understood as "adjacent, ignoring white-space" > - but that doesn't seem obvious to me. It also sounds vaguely familiar, > like I've had this discussion with someone before, but I can't locate > the discussion. Every example of adjacent string literals that appears > in the standard has at least one white-space character separating them, > so the intent is crystal-clear, but the wording doesn't clearly say so. > > If the phrase "White-space characters separating tokens are no longer > significant." were moved from the beginning of the description of phase > 7 to the beginning of the description phase 6, it would make the > insignificance of white space separating string literals perfectly > clear, and as far as I can see, would have no other effect The word "adjacent" doesn't alway mean touching. There is another word for that, the word "adjoining". Booking a hotel reservation for adjacent rooms is not the same as a reservation for adjoining rooms.
Back to comp.std.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-25 10:15 -0500
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-26 12:22 +0000
Re: Adjacent string literals Jakob Bohm <jb-usenet@wisemo.com.invalid> - 2021-01-26 13:48 +0100
Re: Adjacent string literals Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-01-26 13:05 -0800
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-26 21:40 +0000
Re: Adjacent string literals Jakob Bohm <jb-usenet@wisemo.com.invalid> - 2021-01-28 09:53 +0100
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-28 05:45 -0500
Re: Adjacent string literals Richard Damon <Richard@Damon-Family.org> - 2021-01-26 07:52 -0500
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-26 09:29 -0500
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-26 21:46 +0000
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-26 18:28 -0500
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-27 01:16 +0000
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-26 22:48 -0500
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-27 15:46 +0000
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-01-27 11:20 -0500
Re: Adjacent string literals Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-01-28 03:05 +0000
Re: Adjacent string literals Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-07-10 08:49 -0700
Re: Adjacent string literals Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-07-10 14:58 -0700
Re: Adjacent string literals Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-07-22 10:29 -0700
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-07-11 11:41 -0700
Re: Adjacent string literals Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-07-22 15:26 -0700
Re: Adjacent string literals James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-07-22 17:29 -0700
Re: Adjacent string literals Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-01-17 05:29 -0800
csiph-web