[Issue 23883] New: `#line` is off by one and off by two if a line comment follows
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 4 11:32:25 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23883
Issue ID: 23883
Summary: `#line` is off by one and off by two if a line comment
follows
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: qs.il.paperinik at gmail.com
```d
#line 3 "a.d"
```
and
```d
#line 3 "a.d" //
```
behave differently:
In the first case, the #line is line 2, in the second case, the #line is line
1.
I created https://github.com/dlang/dlang.org/pull/3601 to document the current
behavior in the non-comment case.
--
More information about the Digitalmars-d-bugs
mailing list