www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 82] New: incorrect statement is not reachable

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=82

           Summary: incorrect statement is not reachable
           Product: D
           Version: 0.150
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: lane downstairspeople.org


+++ This bug was initially created as a clone of Bug #81 +++

======= 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:~$ ./dmd/bin/dmd -debug -version=bar -w example.d
warning - example.d(21): statement is not reachable


-- 
Apr 02 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=82





------- Comment #1 from lane downstairspeople.org  2006-04-03 01:07 -------
*** Bug 81 has been marked as a duplicate of this bug. ***


-- 
Apr 02 2006