This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2026-01-10
(From submission #826.)
__LINE__ is specified in 15.12 [cpp.predefined] paragraph 1 as:
The presumed line number (within the current source file) of the current source line (an integer literal).
The spelling of a literal is observable through stringizing (15.7.3 [cpp.stringize]). Furthmore, the set of possible spellings for a literal of a given integer value has expanded over time; for example digit separators and binary integer literals are permitted since C++14.
A program that relies on a particular spelling of an integer literal expanded from __LINE__ might thus break, e.g. when crafting unique identifiers using token concatenation (15.7.4 [cpp.concat]).
We could either add an Annex C entry for this breakage in C++14, or specify that __LINE__ always yields a decimal integer literal with no digit separators.
See also WG14 issue 1016.
Proposed resolution (reviewed by CWG 2026-01-09):
Change in 15.12 [cpp.predefined] as follows:
__LINE__ AnA decimal integer literal (5.13.2 [lex.icon]), with no digit separators and no integer-suffix, representing the presumed line number of the current source line within the current source file. [Note 4: The presumed line number can be changed by the #line directive (15.8). —end note]