[LLVMbugs] [Bug 6451] New: Missing diagnostics for jump crossing initialization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 1 11:34:54 PST 2010


           Summary: Missing diagnostics for jump crossing initialization
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

The jump diagnostics need to learn that we can't jump past an initialization in

terfin:clang dgregor$ cat t.C
struct X {

void f() {
  goto later;
  X x;
terfin:clang dgregor$ clang -fsyntax-only t.C
terfin:clang dgregor$ g++ -fsyntax-only t.C
t.C: In function ‘void f()’:
t.C:8: error: jump to label ‘later’
t.C:6: error:   from here
t.C:7: error:   crosses initialization of ‘X x’

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list