Bug 50967 - Resolving template functions through ?
Resolving template functions through ?
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-08-05 15:15 EDT by Thor Nolen
Modified: 2007-03-26 23:47 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.96-96
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-03 18:41:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
funcptr2.cc code (878 bytes, text/plain)
2001-08-05 15:16 EDT, Thor Nolen
no flags Details

  None (edit)
Description Thor Nolen 2001-08-05 15:15:20 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.
Comment 1 Thor Nolen 2001-08-05 15:16:59 EDT
Created attachment 26353 [details]
funcptr2.cc code
Comment 2 Jakub Jelinek 2001-08-08 13:04:21 EDT
This was fixed with
in 3.0.1 and it fixes it for 2.96-RH too, will put it into 2.96-96.
Comment 3 Jakub Jelinek 2001-08-09 06:28:04 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.