This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54813] NULL pointer conversion fails for template code


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
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]