Bug 81 – incorrect statement is not reachable in 0.18

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2006-04-02T21:56:00Z
Last change time
2015-06-09T05:15:11Z
Assigned to
braddr
Creator
lane

Comments

Comment #0 by lane — 2006-04-02T21:56:32Z
This is from the version hosted at http://www.puremagic.com/~braddr/d/gdc/ ======= example.d ======= module example; import std.c.stdio, std.string; void foo() { printf( toStringz( "foo!" ) ); } void bar() { printf( toStringz( "bar!" ) ); } void main( char[][] args ) { switch( args[1] ) { debug { case "--foo": case "-f": foo(); break; } version( bar ) { case "--bar": case "-b": bar(); break; } default: foo(); bar(); break; } } ======== ======== lane@wookies:~$ gdc --version gdc (GCC) 4.0.3 (gdc 0.18-alpha-1, using dmd 0.148) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. lane@wookies:~$ gdc -fdebug -fversion=bar -Wall example.d warning - example.d:21: statement is not reachable
Comment #1 by braddr — 2006-04-02T23:35:15Z
Have you tried this with dmd itself? It's unlikely that this is a gdc specific bug.
Comment #2 by lane — 2006-04-03T01:07:52Z
It's a frontend bug. Sorry. I'll check against dmd in the future. *** This bug has been marked as a duplicate of 82 ***
Comment #3 by bugzilla — 2006-06-18T02:24:38Z
Works with DMD 0.160.