[Bug c++/40336] New: Language linkage should be part of the function type
schaub-johannes at web dot de
gcc-bugzilla@gcc.gnu.org
Thu Jun 4 14:15:00 GMT 2009
Hello all, i discovered that the following code doesn't compile, why i expected
that it compiles fine
template<typename, typename> struct F { typedef int type; };
template<typename A> struct F<A, A> { };
typedef void(*fp0)();
extern "C" typedef void (*fp1)();
int main() { F<fp0, fp1>::type i; }
// diagnostic:
main.cpp: In function 'int main()':
main.cpp:7: error: 'type' is not a member of 'F<void (*)(), void (*)()>'
main.cpp:7: error: expected ';' before 'i'
The problem seems to be that it thinks the function pointer types are the same
- but C++ is very clear on that they are different types.
--
Summary: Language linkage should be part of the function type
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schaub-johannes at web dot de
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40336
More information about the Gcc-bugs
mailing list