[LLVMbugs] [Bug 2502] New: Function pointer types are wrongly compared
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Jun 28 16:31:29 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2502
Summary: Function pointer types are wrongly compared
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: filcab at gmail.com
CC: llvmbugs at cs.uiuc.edu
clang blows up with the following program:
void (*f)(void);
void (*f)() = 0;
But gcc compiles happily. Also, in the draft for the standard (
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
), it is said that (section 6.9.1 - Function definitions):
typedef int F(void); //type F is ‘‘function with no parameters
// returning int’’
// ...
int g() { /* ... */ } //RIGHT: g has type compatible with F
So I'm assuming it's a bug in clang.
The offending line is (I think) clang/lib/Sema/SemaDecl.cpp:401.
SVN Revision: 52870
--
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