[diff.cpp03.lex]

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

## C.6 C++ and ISO C++ 2003 [[diff.cpp03]](diff.cpp03#lex)

### C.6.2 [[lex]](lex "5 Lexical conventions"): lexical conventions [diff.cpp03.lex]

[1](#1)

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

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


**Change:** New kinds of [*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]")*s*[.](#1.sentence-1)

  


**Rationale:** Required for new features[.](#1.sentence-2)

  


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

Specifically, macros named R, u8,u8R, u, uR, U, UR, or LR will
not be expanded when adjacent to a [*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]") but will be interpreted as
part of the [*string-literal*](lex.string#nt:string-literal "5.13.5 String literals [lex.string]")[.](#1.sentence-4)

[*Example [1](#example-1)*: #define u8 "abc"const char* s = u8"def"; // Previously "abcdef", now "def" â *end example*]

[2](#2)

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

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


**Change:** User-defined literal string support[.](#2.sentence-1)

  


**Rationale:** Required for new features[.](#2.sentence-2)

  


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

[*Example [2](#example-2)*: #define _x "there""hello"_x // #1

Previously, #1 would have consisted of two separate preprocessing tokens and
the macro _x would have been expanded[.](#2.sentence-4)

In this revision of C++,
#1 consists of a single preprocessing token, so the macro is not expanded[.](#2.sentence-5)

â *end example*]

[3](#3)

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

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


**Change:** New keywords[.](#3.sentence-1)

  


**Rationale:** Required for new features[.](#3.sentence-2)

  


**Effect on original feature:** Added to Table [5](lex.key#tab:lex.key "Table 5: Keywords"), the following identifiers are new keywords:alignas,alignof,char16_t,char32_t,constexpr,decltype,noexcept,nullptr,static_assert,
andthread_local[.](#3.sentence-3)

Valid C++ 2003 code using these identifiers is invalid in this revision of C++[.](#3.sentence-4)

[4](#4)

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

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


**Change:** Type of integer literals[.](#4.sentence-1)

  


**Rationale:** C99 compatibility[.](#4.sentence-2)

  


**Effect on original feature:** Certain integer literals larger than can be represented by long could
change from an unsigned integer type to signed long long[.](#4.sentence-3)
