This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/2899: Internal compiler error when using typename in template function
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2899: Internal compiler error when using typename in template function
- From: efri dot nattel at webcollage dot com
- Date: 22 May 2001 14:29:49 -0000
- Reply-To: efri dot nattel at webcollage dot com
>Number: 2899
>Category: c++
>Synopsis: Internal compiler error when using typename in template function
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 22 07:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Efri Nattel
>Release: gcc 2.95.2 19991024 (release)
>Organization:
>Environment:
SunOS 5.6
>Description:
The following fragment causes gcc to crash:
--- foo.cpp begins
template <class PA> inline void foo(PA* dummy)
{
typename PA::B;
}
--- foo.cpp ends
--- output begins
%gcc foo.cpp
foo.cpp: In function `void foo(PA *)':
foo.cpp:3: Internal compiler error.
foo.cpp:3: Please submit a full bug report.
foo.cpp:3: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
-- output ends
I did not include any log/attachments - because the problem is very straight-forward and does not need any includes or compilation flags.
The problem looks very similar to bug c++/2458 titled
"typename within function template cause internal compiler error".
I still post it because the scenario is much simpler (and maybe it _is_ something different, after all...)
>How-To-Repeat:
Run 'gcc foo.cpp', where 'foo.cpp' contains:
--- foo.cpp begins
template <class PA> inline void foo(PA* dummy)
{
typename PA::B;
}
--- foo.cpp ends
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: