[LLVMbugs] [Bug 5131] New: Initializer elements accepted by gcc are rejected by clang

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Oct 4 06:54:29 PDT 2009


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

           Summary: Initializer elements accepted by gcc are rejected by
                    clang
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=3610)
 --> (http://llvm.org/bugs/attachment.cgi?id=3610)
Complete testcase.

Clang rejects this code, which is taken from the GCC manual:

  static const int array[] = { &&foo - &&foo,
                               &&bar - &&foo,
                               &&hack - &&foo };

The error given is:

cgoto.c:8:30: error: initializer element is not a compile-time constant
  static const int array[] = { &&foo - &&foo,


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