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: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs