[LLVMbugs] [Bug 2658] New: c89 code not parsed correctly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Aug 10 00:15:31 PDT 2008


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

           Summary: c89 code not parsed correctly
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: isanbard at gmail.com
                CC: llvmbugs at cs.uiuc.edu


This code parses correctly in GCC but not in clang:

$ cat t.c
#include <stdio.h>

int main() {
  float f = 3.0 //*hello world*/1.2;

  printf("f == %f\n", f);
  return 0;
}
$ gcc -o t t.c -std=c89
$ ./t
f == 2.500000
$ clang -o t t.c -std=c89
t.c:6:3: error: parse error
  printf("f == %f\n", f);
  ^
1 diagnostic 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