Bug 48093 - gcc C++ internal error on incorrect usage of "typename"
Summary: gcc C++ internal error on incorrect usage of "typename"
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: All Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-09 16:52 UTC by Kenton Varda
Modified: 2007-04-18 16:34 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-25 14:50:56 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)

Description Kenton Varda 2001-07-09 16:52:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2-2 i686; en-US; 0.7) Gecko/20010316

Description of problem:
This code is not valid C++.  However, it crashes GCC.

template<typename T>
void f()
{
    typename T::u;  //incorrect C++
}


How reproducible:
Always

Steps to Reproduce:
Compile the code

Actual Results:
testgcctypenamebug.cpp: In function `void f ()':
testgcctypenamebug.cpp:4: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

Expected Results:
Some form of error indicating that the code is incorrect.

Additional info:

This bug is only relevant to those of us who learn C++ by writing code and
seeing if GCC compiles it.  :)

Comment 1 Jakub Jelinek 2001-07-25 14:50:51 UTC
Fixed with http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00490.html
which will be included in gcc-c++-2.96-96.


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