Bug 19542 – Forward reference segfault with string namespace C++ syntax

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-01-03T05:15:40Z
Last change time
2020-03-21T03:56:34Z
Keywords
C++, ice, pull
Assigned to
No Owner
Creator
Mathias LANG

Comments

Comment #0 by pro.mathias.lang — 2019-01-03T05:15:40Z
``` pragma(msg, func!(int).mangleof); extern(C++, `bar`) { void func(T)(); } ``` SEGV with DMD64 D Compiler v2.084.0-170-g16cf015ec Moving `pragma` after the declaration, or using the non-string syntax does not.
Comment #1 by dlang-bot — 2020-01-16T12:53:07Z
@Geod24 created dlang/dmd pull request #10729 "Fix issue 19542: Forward reference segfault with string namespace C++ syntax" fixing this issue: - Fix issue 19542: Forward reference segfault with string namespace C++ syntax This segfaulted for some constructs, such as `pragma(msg)` and `enum`, but not others, such as `static assert`, hence why the value isn't checked. https://github.com/dlang/dmd/pull/10729
Comment #2 by dlang-bot — 2020-01-16T18:31:03Z
dlang/dmd pull request #10729 "Fix issue 19542: Forward reference segfault with string namespace C++ syntax" was merged into stable: - cc9f2d46deff94ea9e553d6b79c6206a3c6a8b6f by Geod24: Fix issue 19542: Forward reference segfault with string namespace C++ syntax This segfaulted for some constructs, such as `pragma(msg)` and `enum`, but not others, such as `static assert`, hence why the value isn't checked. https://github.com/dlang/dmd/pull/10729