[LLVMbugs] [Bug 2241] New: Suboptimal error recovery in initializers

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Apr 20 06:14:24 PDT 2008


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

           Summary: Suboptimal error recovery in initializers
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: NetBSD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: neil at daikokuya.co.uk
                CC: llvmbugs at cs.uiuc.edu


Once clang finds an erroneous literal in an initializer, it seems to give up on
the whole initializer and not diagnose subsequent problems.  For example:

float f[] = { 1e, 1ee0 };

$ clang /tmp/test.c
/tmp/test.c:1:15: error: exponent has no digits
float f[] = { 1e, 1ee0 };
              ^
1 diagnostic generated.

GCC diagnoses both problems:

$ gcc /tmp/test.c
/tmp/test.c:1:15: error: exponent has no digits
/tmp/test.c:1:19: error: exponent has no digits


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