Bug 48093 - gcc C++ internal error on incorrect usage of "typename"
gcc C++ internal error on incorrect usage of "typename"
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-07-09 12:52 EDT by Kenton Varda
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-25 10:50:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kenton Varda 2001-07-09 12:52:50 EDT
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:

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 10:50:51 EDT
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.