[LLVMbugs] [Bug 7693] New: Overly aggressive error: illegal goto into protected scope

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 22 23:24:14 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7693

           Summary: Overly aggressive error: illegal goto into protected
                    scope
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: 641 at rudkx.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=5254)
 --> (http://llvm.org/bugs/attachment.cgi?id=5254)
A test case that demonstrates the issue.

I believe the intent of this error is to protect against skipping over a ctor
for a value that you will then reach the dtor for.

The issue is that this error is emitted even when all you are skipping are
initializers for POD types.

I've attached the example which produces the output below. This is a much
reduced example of a real piece of code that has several dozen of these errors
when compiling with clang.

goto.cpp:2:3: error: illegal goto into protected scope
  goto L;
  ^
goto.cpp:3:7: note: jump bypasses variable initialization
  int i = 0;

-- 
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