[LLVMbugs] [Bug 6857] New: Expression statement in local scope causes inaccurate diagnostics.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 17 03:41:06 PDT 2010


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

           Summary: Expression statement in local scope causes inaccurate
                    diagnostics.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zaffanella at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu


The following program, using non-standard extensions:

void foo(void) {
  struct s {
    int i[({typedef int Int; 3;})];
  };
}

causes the generation of the following inaccurate diagnostic ("file scope"):

llvm/Debug/bin/clang -fsyntax-only bug.c
bug.c:3:11: error: statement expression not allowed at file scope
    int i[({typedef int Int; 3;})];
          ^
1 error generated.

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