Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #151933
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: longer 'char literals' meaning in c |
| Date | Fri, 01 May 2020 13:11:04 -0700 |
| Organization | None to speak of |
| Lines | 49 |
| Message-ID | <87wo5v2z6v.fsf@nosuchdomain.example.com> (permalink) |
| References | <a844dd76-5343-4845-a9d2-1d05d042baa0@googlegroups.com> <r8eebl$ru0$1@news.albasani.net> <9bf151f2-e3f8-488b-bf10-9ba136d23a4f@googlegroups.com> <DZzqG.217998$dx4.55655@fx05.am4> <87sggk665l.fsf@nosuchdomain.example.com> <znHqG.187261$vn2.19120@fx34.am4> <874kt061yl.fsf@nosuchdomain.example.com> <oNIqG.282039$QJp.69102@fx08.am4> <87tv104ij2.fsf@nosuchdomain.example.com> <4lKqG.254784$mk2.321@fx21.am4> <87lfmc4dwh.fsf@nosuchdomain.example.com> <KXSqG.219100$dx4.181445@fx05.am4> <4aea0111-3c1d-4763-82b5-20c56d0a7ad8@googlegroups.com> <JJWqG.306472$QJp.205339@fx08.am4> <878sib4mp4.fsf@nosuchdomain.example.com> <t4%qG.450359$8qv1.115159@fx12.am4> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader02.eternal-september.org; posting-host="3a8562cb4f6a88758e42aeb600e70f1e"; logging-data="23199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kvE66nY4uFzTqAM00bq/0" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
| Cancel-Lock | sha1:u/fBC5fu2SfHznOead9ywyloye8= sha1:OcUhBW5zG5v7y/fIIRGJe9OfVQo= |
| Xref | csiph.com comp.lang.c:151933 |
Show key headers only | View raw
Bart <bc@freeuk.com> writes:
[...]
> I said this up-thread:
>
> BC:"C with 32-bit ints also limit the length to 4 characters."
>
> which you decided to dispute by pedantically saying that C allows more
> than 4 characters, even though only 4 will be significant.
>
> How will that information be of use to anyone?
It is of use *to most people here* to understand what the C standard
actually says. I understand that you don't consider that to be of any
use to you. I don't understand why you insist on discussing something
that you claim not to care about, or why you seem to be unable to deal
with the fact that other people *do* care about it.
And I never said that 4 characters will be significant. It's very
likely that 4 characters will be significant (for an implementation with
32-bit int and 8-bit char), but the standard doesn't guarantee it.
> C doesn't magically let them write "if (cmd == 'ABCDEF')" in the same
> way that the same implementation allows "if(cmd == 'ABCD')", and most
> implementations don't even properly point out that the former will
> never work as intended.
>
> To repeat: for all practical purposes, 32-bit C compilers that
> meaningfully support 'ABC' constants at all, limit them to 'ABCD'.
It depends on what you mean by "limit", something that you never made
clear. Some compilers "limit" them by ignoring the extra characters,
perhaps with a warning. Some "limit" them by rejecting them (which is
non-conforming behavior).
My point is this: A conforming C compiler must accept 'ABCDEF' as a
valid character constant. Equivalently, a C compiler that rejects
'ABCDEF' (meaning that it fails to translate a translation unit
containing it) is non-conforming.
If you don't care about that fact, that's fine.
If you agree with it, that's great.
If you disagree with it, you're wrong.
And if you want to drop this, now would be a good time.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 04:43 -0700
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 13:55 +0200
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 05:17 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 05:22 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 05:24 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 05:29 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 06:16 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 05:44 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 14:00 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 06:13 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 14:41 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 07:18 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 07:31 -0700
Re: longer 'char literals' meaning in c Spiros Bousbouras <spibou@gmail.com> - 2020-04-30 15:49 +0000
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 09:12 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 15:49 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 08:31 -0700
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-30 14:00 -0700
Re: longer 'char literals' meaning in c Spiros Bousbouras <spibou@gmail.com> - 2020-04-30 21:16 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-30 15:22 -0700
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-30 18:36 -0400
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 22:25 +0100
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-30 15:30 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-05-01 00:01 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 16:15 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 16:29 -0700
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-30 17:15 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-05-01 01:47 +0100
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-30 18:38 -0700
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-04-30 18:55 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-05-01 11:35 +0100
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-01 05:47 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-05-01 06:15 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-05-01 15:53 +0100
Re: longer 'char literals' meaning in c Richard Damon <Richard@Damon-Family.org> - 2020-05-01 12:38 -0400
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-01 09:57 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-05-01 20:50 +0100
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-01 13:11 -0700
Re: longer 'char literals' meaning in c jameskuyper@stellarscience.com - 2020-05-01 12:05 -0700
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-01 19:08 -0400
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-01 09:51 -0700
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-05-02 15:22 +0200
Re: longer 'char literals' meaning in c Richard Damon <Richard@Damon-Family.org> - 2020-05-02 12:13 -0400
Re: longer 'char literals' meaning in c Les Cargill <lcargill99@comcast.com> - 2020-05-04 00:17 -0500
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-04 10:51 -0400
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-04 10:23 -0400
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-05-04 16:48 +0200
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-04 12:39 -0400
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-05-04 19:37 +0200
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-04 15:03 -0400
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-05-05 08:33 +0200
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-05 09:47 -0400
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-05-05 16:22 +0200
Re: longer 'char literals' meaning in c Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-04 10:27 -0700
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-05 00:47 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-04 20:08 -0700
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-04 23:52 -0400
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-05 17:10 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-05 13:41 -0700
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-05 22:29 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-05 16:18 -0700
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-06 02:33 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-05 20:06 -0700
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-06 18:57 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-06 13:37 -0700
Re: longer 'char literals' meaning in c Spiros Bousbouras <spibou@gmail.com> - 2020-05-07 13:48 +0000
Re: longer 'char literals' meaning in c Spiros Bousbouras <spibou@gmail.com> - 2020-05-07 13:58 +0000
Re: longer 'char literals' meaning in c Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2020-05-07 18:01 -0700
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-05 20:18 -0400
Re: longer 'char literals' meaning in c antispam@math.uni.wroc.pl - 2020-05-06 20:01 +0000
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-05-06 18:20 -0400
Re: longer 'char literals' meaning in c Siri Cruise <chine.bleu@yahoo.com> - 2020-04-30 20:13 -0700
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 16:58 +0200
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 16:59 +0200
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 17:14 +0200
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 08:33 -0700
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 18:15 +0200
Re: longer 'char literals' meaning in c James Kuyper <jameskuyper@alumni.caltech.edu> - 2020-04-30 08:33 -0700
Re: longer 'char literals' meaning in c David Brown <david.brown@hesbynett.no> - 2020-04-30 17:49 +0200
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 17:23 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 09:38 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 17:56 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 10:04 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 18:28 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 10:39 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 19:16 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 11:24 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 19:58 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 12:08 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 20:16 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 12:29 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 12:10 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 11:17 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 10:31 -0700
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 19:20 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 11:28 -0700
Re: longer 'char literals' meaning in c Richard Damon <Richard@Damon-Family.org> - 2020-04-30 13:48 -0400
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 09:01 -0700
Re: longer 'char literals' meaning in c Vir Campestris <vir.campestris@invalid.invalid> - 2020-04-30 21:32 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 13:43 -0700
Re: longer 'char literals' meaning in c Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-04-30 16:54 -0400
Re: longer 'char literals' meaning in c Vir Campestris <vir.campestris@invalid.invalid> - 2020-05-03 21:23 +0100
Re: longer 'char literals' meaning in c Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2020-05-03 16:48 -0400
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 11:38 -0700
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 11:57 -0700
Re: longer 'char literals' meaning in c Bonita Montero <Bonita.Montero@gmail.com> - 2020-04-30 21:01 +0200
Re: longer 'char literals' meaning in c Bart <bc@freeuk.com> - 2020-04-30 20:07 +0100
Re: longer 'char literals' meaning in c fir <profesor.fir@gmail.com> - 2020-04-30 12:41 -0700
Re: longer 'char literals' meaning in c Tim Rentsch <tr.17687@z991.linuxsc.com> - 2020-05-04 10:30 -0700
csiph-web