http://llvm.org/bugs/show_bug.cgi?id=15150
Bug #: 15150
Summary: Can not use C99 function names as variable names in
C89
Product: clang
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
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.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs