Skip to content

Commit a167f5c

Browse files
tkoeppezygoloid
authored andcommitted
[compatibility] Add compatibility notices for pp-number (#713)
1 parent 6f8631d commit a167f5c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

source/compatibility.tex

+15
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,21 @@
15111511
string literal, as part of the implementation-defined mapping from physical
15121512
source file characters to the basic source character set.
15131513

1514+
\ref{lex.ppnumber}
1515+
\change \grammarterm{pp-number} can contain \tcode{p} \grammarterm{sign} and
1516+
\tcode{P} \grammarterm{sign}
1517+
\rationale Necessary to enable hexadecimal floating literals.
1518+
\effect
1519+
Valid \CppXIV code may fail to compile or produce different results in
1520+
this International Standard. Specifically, character sequences like \tcode{0p+0}
1521+
and \tcode{0e1_p+0} are three separate tokens each in \CppXIV, but one single token
1522+
in this International Standard.
1523+
1524+
\begin{codeblock}
1525+
#define F(a) b ## a
1526+
int b0p = F(0p+0); // ill-formed; equivalent to ``\tcode{int b0p = b0p + 0;}\!'' in C++ 2014
1527+
\end{codeblock}
1528+
15141529
\rSec2[diff.cpp14.expr]{Clause \ref{expr}: expressions}
15151530

15161531
\ref{expr.post.incr}, \ref{expr.pre.incr}

0 commit comments

Comments
 (0)