Bug 17883 – Error: undefined identifier: Static if bodies depend on order of declarations

Status
NEW
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-10-07T22:09:45Z
Last change time
2024-12-13T18:54:49Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Iain Buclaw
Blocks
21171
See also
https://issues.dlang.org/show_bug.cgi?id=20905
Moved to GitHub: dmd#19325 →

Comments

Comment #0 by ibuclaw — 2017-10-07T22:09:45Z
This does not compile: --- public import core.sys.posix.sys.mman; import core.sys.linux.config; static if (__USE_MISC) { enum MAP_RENAME = MAP_ANONYMOUS; } static if (__USE_MISC) { enum MAP_ANONYMOUS = MAP_ANON; } --- Swapping the static ifs around, however, and it does. This is particular bug is causing SPARC, SPARC64, MIPS and MIPS64 builds to fail.
Comment #1 by github-bugzilla — 2017-10-08T17:51:56Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/e239f80fbee0c953ed50a039d140d0376647d7d4 Add workaround for issue 17883 in core.sys.linux.sys.mman https://github.com/dlang/druntime/commit/58d573a593d6417928b9d710421b16802001a2c2 Merge pull request #1931 from ibuclaw/wkarnd17883 Add workaround for issue 17883 in core.sys.linux.sys.mman merged-on-behalf-of: Petar Kirov <[email protected]>
Comment #2 by github-bugzilla — 2017-10-16T09:57:23Z
Commits pushed to stable at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/e239f80fbee0c953ed50a039d140d0376647d7d4 Add workaround for issue 17883 in core.sys.linux.sys.mman https://github.com/dlang/druntime/commit/58d573a593d6417928b9d710421b16802001a2c2 Merge pull request #1931 from ibuclaw/wkarnd17883
Comment #3 by robert.schadek — 2024-12-13T18:54:49Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19325 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB