This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH: PR 12515


On Fri, Nov 21, 2003 at 02:13:31PM -0800, Mark Mitchell wrote:
>       return build (COND_EXPR,
>   		  TREE_TYPE (expr),
>   		  TREE_OPERAND (expr, 0),
> ! 		  (TREE_OPERAND (expr, 1) 
> ! 		   ? build_non_dependent_expr (TREE_OPERAND (expr, 1))
> ! 		   : build_non_dependent_expr (TREE_OPERAND (expr, 0))),
>   		  build_non_dependent_expr (TREE_OPERAND (expr, 2)));

This looks like it would fail:

int main()
{
  int i = 0, j;
  j = ++i ? : 0;
  if (i != 1 || j != 1)
    abort ();
}


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]