[Issue 4101] New: DMD doesn't give error when goto skips initialization

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 17 13:23:03 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4101

           Summary: DMD doesn't give error when goto skips initialization
           Product: D
           Version: 2.041
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jlquinn at optonline.net


--- Comment #0 from Jerry Quinn <jlquinn at optonline.net> 2010-04-17 13:23:00 PDT ---
The following code should not compile but does with DMD 2.041.
The goto skips several initializations.

 void foo() {
    goto L0;
      int b;
      struct S { int a; this(int c) { a=c; } }
      S s = S(5);
      class C { int a; }
      C c = new C;
   L0: ;
      s.a++;
      c.a++;
 }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list