This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54813] NULL pointer conversion fails for template code
- From: "tjablin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Oct 2012 16:41:06 +0000
- Subject: [Bug c++/54813] NULL pointer conversion fails for template code
- Auto-submitted: auto-generated
- References: <bug-54813-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54813
--- Comment #1 from tjablin at gmail dot com 2012-10-04 16:41:06 UTC ---
I have further simplified the testcase as follows:
template<class T> static void bar(T, char[][sizeof(T)]) {}
void baz() {
bar<int>(0, 0); // succeeds
char a[4][sizeof(int)];
bar(0, a); // succeeds
bar(0, 0); // fails
}