Bug 21531 – dtoh: Forward-referencing issue wrt. globals of custom types

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-09T16:38:24Z
Last change time
2024-12-13T19:13:50Z
Assigned to
No Owner
Creator
kinke
Moved to GitHub: dmd#18014 →

Comments

Comment #0 by kinke — 2021-01-09T16:38:24Z
In current frontend.h, we have: ``` [...] struct Global; [...] extern Global global; struct Loc { [...] const char* toChars(bool showColumns = global.params.showColumns, uint8_t messageStyle = static_cast<uint8_t>(global.params.messageStyle)) const; [...] }; ``` The `Global` struct declaration follows later but is required before `Loc::toChars()` and its default parameter values.
Comment #1 by moonlightsentinel — 2021-06-18T11:22:59Z
Most of these issues will be resolved https://github.com/dlang/dmd/pull/12678.
Comment #2 by robert.schadek — 2024-12-13T19:13:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18014 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB