Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #167388
| From | Kaz Kylheku <480-992-1380@kylheku.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: invalid universal character gives error even after #if 0 |
| Date | 2022-08-31 16:51 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <20220831094050.208@kylheku.com> (permalink) |
| References | <temv38$kie6$1@solani.org> <chine.bleu-4CAF00.02132731082022@news.eternal-september.org> |
On 2022-08-31, Siri Cruise <chine.bleu@yahoo.com> wrote:
> In article <temv38$kie6$1@solani.org>,
> Philipp Klaus Krause <pkk@spth.de> wrote:
>
>> By a quick look at the standard it seems to me that the constraint on
>> universal character names would be treated the same as e.g. the
>> constraint on constants having a type and the value being in the
>> representable range. But I don't think anyone would expect an error on a
>> long sequence of digits inside an #if 0.
>
> Doctor! Doctor! It hurts when I do this.
>
> Then stop doing it.
Indeed.
I believe that universal characters in identifiers are akin to ANSI
trigraphs. You're not supposed to code with them.
If you're using internationalzed identifiers, use UTF-8
and a compiler which handles that:
int 倍(int 引)
{
return 引 * 2;
}
What universal character names allow you to do is encode the above
UTF-8 program into 7 bit ASCII. Just like trigraphs allow a 7 bit
ASCII program to be encoded into 6 bit ISO-646.
If you're doing this automatic encoding, you would never generate
a bad universal character name.
It would hurt when you do that, so you would fix your encoder
not to do it.
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
invalid universal character gives error even after #if 0 Philipp Klaus Krause <pkk@spth.de> - 2022-08-31 08:28 +0200
Re: invalid universal character gives error even after #if 0 Kaz Kylheku <480-992-1380@kylheku.com> - 2022-08-31 06:52 +0000
Re: invalid universal character gives error even after #if 0 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-13 07:52 -0700
Re: invalid universal character gives error even after #if 0 Siri Cruise <chine.bleu@yahoo.com> - 2022-08-31 02:13 -0700
Re: invalid universal character gives error even after #if 0 Kaz Kylheku <480-992-1380@kylheku.com> - 2022-08-31 16:51 +0000
Re: invalid universal character gives error even after #if 0 Siri Cruise <chine.bleu@yahoo.com> - 2022-08-31 10:57 -0700
Re: invalid universal character gives error even after #if 0 Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-09-13 07:54 -0700
csiph-web