Red Hat Bugzilla – Bug 50967
Resolving template functions through ?
Last modified: 2007-03-26 23:47:42 EDT
funcptr2.cc - Resolving template functions through ?:. This
problem showed up when we tried to compile under GCC 2.96-85. It
doesn't happen under GCC 2.91.66. The compiler crashes with an
internal error (#980715) when you try to compile code that takes the
address of a static member function. The problem is that you can't
use ?: to decide between templated function pointers within a function
call. If you break out the ?: into an if/else the problem goes away.
Created attachment 26353 [details]
This was fixed with
in 3.0.1 and it fixes it for 2.96-RH too, will put it into 2.96-96.
Fixed is unclear here, because according to Jason Merrill, it is unclear whether this is valid C++ program
or not (it is currently open core issue 115 in the ISO C++ committee).
What the above patch does is to issue error on it.