This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
2908. Counting physical source lines for __LINE__Section: 15.8 [cpp.line] Status: DRWP Submitter: Alisdair Meredith Date: 2024-06-17[Accepted as a DR at the November, 2024 meeting.]
Given the existing implementation divergence, it should be clarified that __LINE__ counts physical source lines, not logical ones.
Proposed resolution (approved by CWG 2024-08-16):
Change in 15.8 [cpp.line] paragraph 2 as follows:
The line number of the current source line is the line number of the current physical source line, i.e. it is one greater than the number of new-line characters read or introduced in translation phase 1 (5.2 [lex.phases]) while processing the source file to the current token.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4