[LLVMbugs] [Bug 2016] New: clang doesn't support gcc's computed goto tables

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 11 16:50:49 PST 2008


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

           Summary: clang doesn't support gcc's computed goto tables
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu


The following code is rejected by clang:

#include <stdio.h>

int main()
{
        static void *table[] = {&&label1, &&label2};

label1:
        goto *(table[1]);
        printf("skip this\n");
label2:
        printf("hello\n");

        return 0;
}


gcc compiles this just fine, and the program outputs "hello"


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