Bug 19460 – C style cast error has wrong line number for functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-12-02T06:58:36Z
Last change time
2023-10-04T16:18:29Z
Keywords
bootcamp, pull, trivial
Assigned to
No Owner
Creator
elpenguino+D

Comments

Comment #0 by elpenguino+D — 2018-12-02T06:58:36Z
``` void main() { (void) main(); } ``` On this example, the error points to line 3 when the cast is really on line 2. It seems DMD uses the last line of the function call rather than the actual line the cast is on.
Comment #1 by dlang-bot — 2023-10-03T16:18:14Z
@Mai-Lapyst created dlang/dmd pull request #15649 "Fix issue 19460 - C style cast error has wrong line number for functions" fixing this issue: - Fix issue 19460 - C style cast error has wrong line number for functions https://github.com/dlang/dmd/pull/15649
Comment #2 by dlang-bot — 2023-10-04T16:18:29Z
dlang/dmd pull request #15649 "Fix issue 19460 - C style cast error has wrong line number for functions" was merged into master: - ecc3070250295fce871c0b16f35d7dbedf6d39a1 by Mai-Lapyst: Fix issue 19460 - C style cast error has wrong line number for functions https://github.com/dlang/dmd/pull/15649