Skip to content

Commit 57ca65b

Browse files
committed
[compatibility] Add compatibility notices for pp-number
1 parent 794ad9e commit 57ca65b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

source/compatibility.tex

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,21 @@
853853
the macro \tcode{_x} would have been expanded. In this International Standard,
854854
\#1 consists of a single preprocessing tokens, so the macro is not expanded.
855855

856+
\ref{lex.ppnumber}
857+
\change \grammarterm{pp-number} can contain \tcode{p} \grammarterm{sign} and
858+
\tcode{P} \grammarterm{sign}
859+
\rationale Necessary to enable hexadecimal floating literals.
860+
\effect
861+
Valid \CppIII code may fail to compile or produce different results in
862+
this International Standard. Specifically, character sequences like \tcode{0p+0}
863+
are three separate tokens in \CppIII, but one single token in this International
864+
Standard. For example:
865+
866+
\begin{codeblock}
867+
#define F(a) b ## a
868+
int b0p = F(0p0+0); // ill-formed; equivalent to ``\tcode{int b0p = b0p + 0;}\!'' in C++ 2003
869+
\end{codeblock}
870+
856871
\ref{lex.key}
857872
\change New keywords
858873
\rationale Required for new features.
@@ -1477,6 +1492,16 @@
14771492
string literal, as part of the implementation-defined mapping from physical
14781493
source file characters to the basic source character set.
14791494

1495+
\ref{lex.ppnumber}
1496+
\change \grammarterm{pp-number} can contain \tcode{p} \grammarterm{sign} and
1497+
\tcode{P} \grammarterm{sign}
1498+
\rationale Necessary to enable hexadecimal floating literals.
1499+
\effect
1500+
Valid \CppXI code may fail to compile or produce different results in
1501+
this International Standard. Specifically, character sequences like \tcode{0e1_p+0}
1502+
are three separate tokens in \CppXIV, but one single token in this International
1503+
Standard.
1504+
14801505
\rSec2[diff.cpp14.expr]{Clause \ref{expr}: expressions}
14811506

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

0 commit comments

Comments
 (0)