Bug 21620 – pragma(crt_constructor) should run on all functions in block referred to

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-09T08:08:29Z
Last change time
2024-12-13T19:14:32Z
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=21622, https://issues.dlang.org/show_bug.cgi?id=21623, https://issues.dlang.org/show_bug.cgi?id=23535
Moved to GitHub: dmd#19867 →

Comments

Comment #0 by bugzilla — 2021-02-09T08:08:29Z
Currently, extern (C) pragma(crt_constructor) { void abc() { } void def() { } } fails, while: extern (C) { pragma(crt_constructor) { void abc() { } } pragma(crt_constructor) { void def() { } } } succeeds. This makes no sense. The pragma should behave like every other attribute that affects a block. Same goes for pragma(crt_destructor)
Comment #1 by robert.schadek — 2024-12-13T19:14:32Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19867 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB