Bug 50967 - Resolving template functions through ?
Summary: Resolving template functions through ?
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-05 19:15 UTC by Thor Nolen
Modified: 2007-03-27 03:47 UTC (History)
1 user (show)

Fixed In Version: 2.96-96
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-03 22:41:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 19:16 UTC, Thor Nolen
no flags Details

Description Thor Nolen 2001-08-05 19:15:20 UTC
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 19:16:59 UTC
Created attachment 26353 [details]
funcptr2.cc code

Comment 2 Jakub Jelinek 2001-08-08 17:04:21 UTC
This was fixed with
http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01723.html
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 10:28:04 UTC
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.