This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Handle GNU style COND_EXPRs with omitted middle arg (PR c++/34270)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Nov 2007 10:11:16 -0800
- Subject: Re: [C++ PATCH] Handle GNU style COND_EXPRs with omitted middle arg (PR c++/34270)
- References: <20071129102839.GF16835@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> 2007-11-29 Jakub Jelinek <jakub@redhat.com>
>
> PR c++/34270
> * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
> in templates.
> * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
> Likewise.
>
> * g++.dg/template/cond7.C: New test.
I was thinking whether we should ever be using these predicates in
templates -- and if we do need to do so, whether these COND_EXPRs should
already have been expanded by duplicating the first operand -- but
anything along those lines is going to be complicated, and your patch
seems straightforward.
Patch OK.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713