Bug 17984 – compile error using DMD v2.077.0-160

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-11-15T22:10:39Z
Last change time
2020-03-21T03:56:34Z
Assigned to
No Owner
Creator
orfeo

Comments

Comment #0 by orfeo — 2017-11-15T22:10:39Z
I cannot compile [pegged](https://github.com/PhilippeSigaud/Pegged) with dmd v2.077.0-160 ``` $ dmd --version DMD64 D Compiler v2.077.0-160-g03e806aba Copyright (c) 1999-2017 by Digital Mars written by Walter Bright ``` So: ``` $ git clone [email protected]:PhilippeSigaud/Pegged.git $ cd Pegged $ dub --force Performing "debug" build using dmd for x86_64. pegged 0.4.2+commit.13.g6308f57: building configuration "default"... pegged/dynamic/grammar.d(270,21): Error: undefined identifier __switch in module object pegged/dynamic/grammar.d(296,17): Error: undefined identifier __switch in module object pegged/dynamic/grammar.d(189,9): Error: undefined identifier __switch in module object pegged/dynamic/grammar.d(351,5): Error: undefined identifier __switch in module object pegged/introspection.d(194,9): Error: undefined identifier __switch in module object pegged/introspection.d(255,9): Error: undefined identifier __switch in module object pegged/introspection.d(298,9): Error: undefined identifier __switch in module object /usr/include/dlang/dmd/std/traits.d(1560,9): Error: undefined identifier __switch in module object /usr/include/dlang/dmd/std/traits.d(1426,70): Error: CTFE failed because of previous errors in extractAttribFlags /usr/include/dlang/dmd/std/typecons.d(4414,29): Error: template instance std.traits.functionAttributes!(ParseTree function(ParseTree) @system) error instantiating /usr/include/dlang/dmd/std/functional.d(1301,13): instantiated from here: generateFunction!("FuncInfo_doIt", "doIt", ParseTree function(ParseTree) @system) /usr/include/dlang/dmd/std/functional.d(1342,38): instantiated from here: DelegateFaker!(ParseTree function(ParseTree) @system) pegged/parser.d(153,38): instantiated from here: toDelegate!(ParseTree function(ParseTree) @system) pegged/parser.d(2115,7): instantiated from here: GenericPegged!(ParseTree) /usr/include/dlang/dmd/std/functional.d(1301,13): Error: CTFE failed because of previous errors in generateFunction pegged/tester/testerparser.d(49,9): Error: undefined identifier __switch in module object dmd failed with exit code 1. ``` My environment ``` $ uname --all Linux abe 4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux $ dub --version DUB version 1.6.0, built on Nov 3 2017 ``` See also https://github.com/PhilippeSigaud/Pegged/issues/237
Comment #1 by johnnymarler — 2017-12-11T17:09:59Z
I'm also seeing this error compiling phobos with the latest dmd compiler. ... std\traits.d(1560): Error: undefined identifier __switch in module object std\traits.d(1560): Error: undefined identifier __switch in module object std\traits.d(1560): Error: undefined identifier __switch in module object ... I'm on windows.
Comment #2 by johnnymarler — 2017-12-11T17:18:46Z
Ah wait a minute, I updated my druntime repository and the error went away.