Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #167355

invalid universal character gives error even after #if 0

From Philipp Klaus Krause <pkk@spth.de>
Newsgroups comp.lang.c
Subject invalid universal character gives error even after #if 0
Date 2022-08-31 08:28 +0200
Message-ID <temv38$kie6$1@solani.org> (permalink)

Show all headers | View raw


I noticed that current gcc and clang give an error on the following:

#if 0
\u003a
#endif

but not on

/*
\u003a
*/

While I see that \u003a is a constraint violation, I do not see how it 
follows from the standard that this is a constraint violation even 
inside #if 0.

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.

Back to comp.lang.c | Previous | NextNext in thread | Find similar | Unroll thread


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