[LLVMbugs] [Bug 15150] New: Can not use C99 function names as variable names in C89
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 4 02:54:58 PST 2013
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: unassignedclangbugs at nondot.org
ReportedBy: ss23 at ss23.geek.nz
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list