File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change 478
478
expression even though it is unsigned in translation phase
479
479
7\iref {lex.phases }.
480
480
\end {note }
481
- This includes interpreting \grammarterm {character-literal}s, which may involve
482
- converting escape sequences into execution character set members.
483
- Whether the numeric value for these \grammarterm {character-literal}s
484
- matches the value obtained when an identical \grammarterm {character-literal}
485
- occurs in an expression
486
- (other than within a
487
- \tcode {\# if}
488
- or
489
- \tcode {\# elif}
490
- directive)
491
- is \impldef {numeric values of \grammarterm {character-literal}s in \tcode {\# if}
492
- directives}.
481
+ This includes interpreting \grammarterm {character-literal}s
482
+ according to the rules in \ref {lex.ccon }.
493
483
\begin {note }
494
- Thus, the constant expression in the following
495
- \tcode {\# if}
496
- directive and
497
- \keyword {if} statement\iref {stmt.if }
498
- is not guaranteed to evaluate to the same value in these two
499
- contexts:
500
- \begin {codeblock }
501
- #if 'z' - 'a' == 25
502
- if ('z' - 'a' == 25)
503
- \end {codeblock }
484
+ The associated character encodings of literals are the same
485
+ in \tcode {\# if} and \tcode {\# elif} directives and in any expression.
504
486
\end {note }
505
- Also, whether a single-character \grammarterm {character-literal} may have a negative
506
- value is \impldef {negative value of \grammarterm {character-literal} in preprocessor}.
507
487
Each subexpression with type
508
488
\tcode {bool}
509
489
is subjected to integral promotion before processing continues.
You can’t perform that action at this time.
0 commit comments