Skip to content

c89 code not parsed correctly #3030

@isanbard

Description

@isanbard
Bugzilla Link 2658
Resolution DUPLICATE
Resolved on Mar 12, 2010 00:56
Version unspecified
OS All

Extended Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions