[diff.cpp14.lex]

# Annex C (informative) Compatibility [[diff]](./#diff)

## C.4 C++ and ISO C++ 2014 [[diff.cpp14]](diff.cpp14#lex)

### C.4.2 [[lex]](lex "5 Lexical conventions"): lexical conventions [diff.cpp14.lex]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1603)

**Affected subclause:** [[lex.phases]](lex.phases)  


**Change:** Removal of trigraph support as a required feature[.](#1.sentence-1)

  


**Rationale:** Prevents accidental uses of trigraphs in non-raw string literals and comments[.](#1.sentence-2)

  


**Effect on original feature:** Valid C++ 2014 code that uses trigraphs may not be valid or may have different
semantics in this revision of C++[.](#1.sentence-3)

Implementations may choose to
translate trigraphs as specified in C++ 2014 if they appear outside of a raw
string literal, as part of theimplementation-defined
mapping from input source file characters to
the translation character set[.](#1.sentence-4)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1618)

**Affected subclause:** [[lex.ppnumber]](lex.ppnumber)  


**Change:** [*pp-number*](lex.ppnumber#nt:pp-number "5.7 Preprocessing numbers [lex.ppnumber]") can contain p [*sign*](lex.fcon#nt:sign "5.13.4 Floating-point literals [lex.fcon]") andP [*sign*](lex.fcon#nt:sign "5.13.4 Floating-point literals [lex.fcon]")[.](#2.sentence-1)

  


**Rationale:** Necessary to enable [*hexadecimal-floating-point-literal*](lex.fcon#nt:hexadecimal-floating-point-literal "5.13.4 Floating-point literals [lex.fcon]")*s*[.](#2.sentence-2)

  


**Effect on original feature:** Valid C++ 2014 code may fail to compile or produce different results in
this revision of C++[.](#2.sentence-3)

Specifically, character sequences like 0p+0 and 0e1_p+0 are three separate tokens each in C++ 2014, but one single token
in this revision of C++[.](#2.sentence-4)

[*Example [1](#example-1)*: #define F(a) b ## aint b0p = F(0p+0); // ill-formed; equivalent to âint b0p = b0p + 0;'' in C++ 2014 â *end example*]
