Re: Default signedness of 'plain' char.

Liste des GroupesRevenir à cl c 
Sujet : Re: Default signedness of 'plain' char.
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 06. Aug 2026, 00:41:36
Autres entêtes
Organisation : None to speak of
Message-ID : <1150hng$3dds0$1@kst.eternal-september.org>
References : 1 2
User-Agent : Gnus/5.13 (Gnus v5.13)
Lynn McGuire <lynnmcguire5@gmail.com> writes:
[...]
So, you have to check every compiler and every compiler version to see
what the signedness of char is.  That is not good in these days of
UTF-8.

Not really.  You can usually write code that doesn't care whether
plain char is signed or unsigned.  And if it matters, you can check
whether CHAR_MIN==0.

This evolved from systems like the PDP-11 where character values
ranged from 0 to 127, so the signedness of plain char didn't
matter much.

It's annoying that, in many implementations, UTF-8 strings can
contain elements with negative values (negative character values
rarely make sense), but in practice it doesn't cause many problems.

IMHO it would be cleaner to require plain char to be unsigned,
but I don't see that happening.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
2 Aug 26 * Default signedness of 'plain' char.85Kenny McCormack
3 Aug 26 +* Re: Default signedness of 'plain' char.8Kenny McCormack
3 Aug 26 i+* Re: Default signedness of 'plain' char.2bart
3 Aug 26 ii`- Re: The Spanish Inquisition1bart
4 Aug13:13 i`* Re: Default signedness of 'plain' char.5Theo
5 Aug08:30 i `* Re: Default signedness of 'plain' char.4Lawrence D’Oliveiro
5 Aug17:20 i  `* Re: Default signedness of 'plain' char.3bart
5 Aug22:57 i   +- Re: Default signedness of 'plain' char.1Lawrence D’Oliveiro
5 Aug23:29 i   `- Re: Default signedness of 'plain' char.1Keith Thompson
3 Aug 26 +* Re: Default signedness of 'plain' char.2David Brown
3 Aug 26 i`- Re: Default signedness of 'plain' char.1BGB
3 Aug 26 +- Re: Default signedness of 'plain' char.1Waldek Hebisch
3 Aug 26 +- Re: Default signedness of 'plain' char.1Dan Cross
3 Aug 26 +* Re: Default signedness of 'plain' char.13Lew Pitcher
3 Aug 26 i`* Re: Default signedness of 'plain' char.12Lew Pitcher
4 Aug 26 i +* Re: Default signedness of 'plain' char.4Keith Thompson
4 Aug16:10 i i`* Re: Default signedness of 'plain' char.3Lew Pitcher
5 Aug04:00 i i +- Re: Default signedness of 'plain' char.1Lawrence D’Oliveiro
5 Aug08:01 i i `- Re: Default signedness of 'plain' char.1David Brown
4 Aug19:10 i `* Re: Default signedness of 'plain' char.7Waldek Hebisch
4 Aug22:25 i  +- Re: Default signedness of 'plain' char.1BGB
5 Aug03:57 i  +* Re: Default signedness of 'plain' char.3Lawrence D’Oliveiro
5 Aug06:19 i  i`* Re: Default signedness of 'plain' char.2Lynn McGuire
5 Aug23:38 i  i `- Re: Default signedness of 'plain' char.1Dan Cross
5 Aug05:36 i  `* Re: Default signedness of 'plain' char.2Keith Thompson
6 Aug01:21 i   `- Re: Default signedness of 'plain' char.1Waldek Hebisch
3 Aug 26 +* Re: Default signedness of 'plain' char.39Chris M. Thomasson
3 Aug 26 i+* Re: Default signedness of 'plain' char.37bart
3 Aug 26 ii`* Re: Default signedness of 'plain' char.36Chris M. Thomasson
4 Aug 26 ii `* Re: Default signedness of 'plain' char.35BGB
4 Aug 26 ii  +* Re: Default signedness of 'plain' char.2Chris M. Thomasson
5 Aug10:40 ii  i`- Re: Default signedness of 'plain' char.1BGB
5 Aug08:22 ii  `* Re: Default signedness of 'plain' char.32Lawrence D’Oliveiro
5 Aug10:02 ii   +* Re: Default signedness of 'plain' char.9BGB
5 Aug11:35 ii   i+- Re: Default signedness of 'plain' char.1David Brown
5 Aug20:39 ii   i+* Re: Default signedness of 'plain' char.3Chris M. Thomasson
6 Aug15:05 ii   ii`* Re: Dear Chris2bart
6 Aug19:10 ii   ii `- Re: Dear Chris1David Brown
5 Aug22:54 ii   i`* Re: Default signedness of 'plain' char.4Lawrence D’Oliveiro
6 Aug10:49 ii   i `* Re: Default signedness of 'plain' char.3BGB
7 Aug01:10 ii   i  `* Re: Default signedness of 'plain' char.2Lawrence D’Oliveiro
7 Aug08:56 ii   i   `- Re: Default signedness of 'plain' char.1David Brown
5 Aug18:33 ii   +* Re: Default signedness of 'plain' char.21James Kuyper
5 Aug22:50 ii   i`* Re: Default signedness of 'plain' char.20Lawrence D’Oliveiro
6 Aug09:34 ii   i `* Re: Default signedness of 'plain' char.19David Brown
9 Aug21:19 ii   i  `* Re: Default signedness of 'plain' char.18BGB
9 Aug21:33 ii   i   +* Re: Default signedness of 'plain' char.4Lawrence D’Oliveiro
10 Aug02:04 ii   i   i`* Re: Default signedness of 'plain' char.3Chris M. Thomasson
10 Aug03:45 ii   i   i `* Re: Default signedness of 'plain' char.2Lawrence D’Oliveiro
10 Aug10:24 ii   i   i  `- Re: Default signedness of 'plain' char.1Chris M. Thomasson
10 Aug02:03 ii   i   +* Re: Default signedness of 'plain' char.12Chris M. Thomasson
10 Aug07:58 ii   i   i`* Re: Default signedness of 'plain' char.11David Brown
10 Aug21:17 ii   i   i `* Re: Default signedness of 'plain' char.10BGB
10 Aug23:19 ii   i   i  +* Re: Default signedness of 'plain' char.6Keith Thompson
10 Aug23:31 ii   i   i  i`* Re: Default signedness of 'plain' char.5BGB
11 Aug00:48 ii   i   i  i +- Re: Default signedness of 'plain' char.1Lawrence D’Oliveiro
11 Aug01:03 ii   i   i  i +* Re: Default signedness of 'plain' char.2James Kuyper
11 Aug02:44 ii   i   i  i i`- Re: Default signedness of 'plain' char.1BGB
11 Aug07:58 ii   i   i  i `- Re: Default signedness of 'plain' char.1David Brown
11 Aug01:29 ii   i   i  +- Re: Default signedness of 'plain' char.1steve g
11 Aug04:58 ii   i   i  +- Re: Vectors! Quaternions! (was Re: Default signedness of 'plain' char.)1Lawrence D’Oliveiro
11 Aug08:06 ii   i   i  `- Re: Default signedness of 'plain' char.1David Brown
11 Aug05:52 ii   i   `- Re: Default signedness of 'plain' char.1Lawrence D’Oliveiro
5 Aug20:36 ii   `- Re: Default signedness of 'plain' char.1Chris M. Thomasson
5 Aug08:18 i`- Re: Default signedness of 'plain' char.1Lawrence D’Oliveiro
6 Aug00:30 `* Re: Default signedness of 'plain' char.20Lynn McGuire
6 Aug00:41  +* Re: Default signedness of 'plain' char.18Keith Thompson
6 Aug01:24  i+* Re: Default signedness of 'plain' char.14bart
6 Aug01:46  ii+- Re: Default signedness of 'plain' char.1Keith Thompson
6 Aug23:59  ii`* Re: Default signedness of 'plain' char.12Dan Cross
7 Aug03:54  ii `* Re: Default signedness of 'plain' char.11Keith Thompson
7 Aug12:02  ii  `* Re: Default signedness of 'plain' char.10Dan Cross
7 Aug18:35  ii   +* Re: Default signedness of 'plain' char.3Keith Thompson
7 Aug19:32  ii   i`* Re: Default signedness of 'plain' char.2Dan Cross
7 Aug19:55  ii   i `- Re: Default signedness of 'plain' char.1Janis Papanagnou
7 Aug19:51  ii   `* Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)6Janis Papanagnou
7 Aug21:03  ii    `* Re: Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)5Keith Thompson
7 Aug21:32  ii     +- Re: Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)1Keith Thompson
7 Aug22:44  ii     +- Re: Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)1Dan Cross
7 Aug22:47  ii     `* Re: Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)2Janis Papanagnou
7 Aug23:26  ii      `- Re: Use of isascii() back in early days (was Re: Default signedness of 'plain' char.)1Keith Thompson
6 Aug23:57  i`* Re: Default signedness of 'plain' char.3Dan Cross
7 Aug02:23  i `* Re: Default signedness of 'plain' char.2Keith Thompson
7 Aug12:47  i  `- Re: Default signedness of 'plain' char.1Dan Cross
6 Aug23:33  `- Re: Default signedness of 'plain' char.1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal