-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributerejects-valid
Description
Bugzilla Link | 15150 |
Version | unspecified |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @gribozavr |
Extended Description
The following code doesn't compile in clang, but does in gcc:
int logf = 5;
int main() {
return logf;
}
# gcc test.c -o test -std=c89
# ./test; echo $?
5
# clang test.c -o test -std=c89
test.c:1:5: error: redefinition of 'logf' as different kind of symbol
int logf = 5;
^
test.c:1:5: note: previous definition is here
test.c:4:16: warning: incompatible pointer to integer conversion returning 'float (float)' from a function with result type 'int' [-Wint-conversion]
return logf;
^~~~
1 warning and 1 error generated.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributerejects-valid