This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: new ICE #122 (20000814): member function of class template
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: new ICE #122 (20000814): member function of class template
- From: Marco Franzen <Marco dot Franzen at Thyron dot com>
- Date: Mon, 21 Aug 2000 17:19:25 +0100
- Organization: Thyron Limited, UK
- References: <00081810373500.00536@Maidavale>
The same ICE 122 can be triggered even without using templates.
(Not sure whether this is correct C++,
but in neither case should the compiler crash.)
=========================================
class Base {
protected:
operator bool() { return true; }
};
class Derived: Base {
Derived (): Base () { if (Base); } // <- here
};
==========================================
The intention of this code is to call the conversion operator of the Base
subobject.
==========================================
GNU C++ version 2.96 20000814 (experimental) (i586-sco-sysv5uw7.1.0)
compiled by GNU C version 2.96 20000814 (experimental). tst.cpp: In method
`Derived::Derived ()': tst.cpp:7: parse error before `)' tst.cpp:7:
Internal error #122. tst.cpp:7: Internal compiler error in finish_function,
at ../egcs-20000814/gcc/cp/decl.c:14394 Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
===========================================
Older gcc versions did not report this (as an) internal error:
===========================================
GNU C++ version 2.95.2 19991024 (release) (hppa1.1-hp-hpux10.20) compiled
by GNU C version 2.95.2 19991024 (release). bug122.cpp: In method
`Derived::Derived()': bug122.cpp:7: parse error before `)'
bug122.cpp:7: confused by earlier errors, bailing out
[Please ignore any confidentiality clause appended.]
.
-----------------------------------------------------------------
This email is confidential and intended solely for the use of the
individual to whom it is addressed.
Any views or opinions presented are solely those of the author
and do not necessarily represent those of Thyron Limited.
If you are not the intended recipient then please be advised
that you have received this email in error and that any use,
dissemination, forwarding, printing or copying of this email
is strictly prohibited.
If you have received this email in error, please notify the
Thyron IT Administrator on +44 (0)1923 236 050 or
send an email to mail-admin@thyron.com.
Thank You