[LLVMbugs] [Bug 8242] New: inline function not reported as FUNC but as NOTYPE
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Sep 27 13:56:08 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8242
Summary: inline function not reported as FUNC but as NOTYPE
Product: libraries
Version: trunk
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rdivacky at freebsd.org
CC: llvmbugs at cs.uiuc.edu
pes ~/whirl$ cat gah.c
inline int foo() {
return 52;
}
int bar() {
if (foo() == 14)
printf("crap\n");
}
pes ~/whirl$ gcc -c gah.c && readelf -a gah.o | tail -5
gah.c:
In function 'bar':
gah.c:7: warning: incompatible implicit declaration of built-in function
'printf'
8: 0000000000000000 11 FUNC GLOBAL DEFAULT 1 foo
9: 0000000000000010 31 FUNC GLOBAL DEFAULT 1 bar
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND puts
No version information found in this file.
pes ~/whirl$ clang -c gah.c && readelf -a gah.o | tail -5
gah.c:7:5: warning: implicitly declaring C library function 'printf' with type
'int (const char *, ...)'
printf("crap\n");
^
gah.c:7:5: note: please include the header <stdio.h> or explicitly provide a
declaration for 'printf'
gah.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
2 warnings generated.
8: 0000000000000000 46 FUNC GLOBAL DEFAULT 1 bar
9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND printf
No version information found in this file.
note the difference in the definition of the symbol foo
--
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