[LLVMbugs] [Bug 6382] New: use of undeclared label

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 22 03:33:33 PST 2010


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

           Summary: use of undeclared label
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rene at exactcode.de
                CC: dgregor at apple.com
   Estimated Hours: 0.0


I reduced another real-world source code currently erroring out with clang++
svn:HEAD. As far as I can see it is triggered by crossing class definition with
ctor - reduced code fragment:

int foo()
{
goto error;
{
  struct BitPacker {
  BitPacker() {}
  };
  BitPacker packer;
}

error:
return -1;
}

While G++ accepts it, clang++ errors out with:

test.cc:3:7: error: use of undeclared label 'error'
goto error;
     ^
1 diagnostic generated.

Removing the ctor is enough to make it compile.

-- 
Configure bugmail: http://www.llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the llvm-bugs mailing list