[LLVMbugs] [Bug 3137] New: strange decl rejected by clang but not by gcc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Nov 26 15:10:20 PST 2008


           Summary: strange decl rejected by clang but not by gcc
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nunoplopes at sapo.pt
                CC: llvmbugs at cs.uiuc.edu

The code below doesn't seem much valid to me, but gcc accepts it.
if function var is removed, it works.

# gcc -fsyntax-only a.c && clang -fsyntax-only a.c
a.c:8:2: error: indirection requires pointer operand ('int' invalid)

extern int *__errno_location(void);

void bar() {
        int *__errno_location();

void 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