This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12515] [3.4 Regression] Use of ?: operator in templated class causes ICE
- From: "ahu at ds9a dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2003 15:52:43 -0000
- Subject: [Bug c++/12515] [3.4 Regression] Use of ?: operator in templated class causes ICE
- References: <20031005125406.12515.ahu@ds9a.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12515
------- Additional Comments From ahu at ds9a dot nl 2003-10-11 15:52 -------
The code in question, which deals with the type of the resuling value, appears
to just not know about the ?: operator. The ternary ?: operator is represented
as an ifexp, an op1 and an op2.
In case of the gcc extension "a ?: b", which is equal to " a ? a : b", op1 is
NULL, which all the regular code knows how to deal with, except the type
dependent stuff for templates.
I tried adding some simple if(op1) tests but I don't think this is the right
direction. Perhaps op1=ifexpr at an early stage would be useful, but this is
beyond my ken.