This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11962] New: SEGV on omitted second operand to ?: in template argument expression
- From: "jbeulich at novell dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Aug 2003 06:43:33 -0000
- Subject: [Bug c++/11962] New: SEGV on omitted second operand to ?: in template argument expression
- 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=11962
Summary: SEGV on omitted second operand to ?: in template
argument expression
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jbeulich at novell dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Since omitting the second operand in a conditional expression is a generally
working GNU extension to the language I would expect it to work in a template
argument expresion, too:
template<int X> class c;
template<int X, int Y> int test(c<X ? : Y>&);
void test(c<2>*c2) {
test<0, 2>(*c2);
}