Re: Use of compound_literal_expr in c vs target_expr in c++ for compound literals

2006-07-24 Thread Fariborz Jahanian
On Jul 24, 2006, at 3:07 PM, Andrew Pinski wrote: gcc generates two separate trees for compound literals in c and c++. As in this test case: struct S { int i,j; }; void foo (struct S); int main () { foo((struct S){1,1}); } On the other hand, such a guard does not e

Re: Use of compound_literal_expr in c vs target_expr in c++ for compound literals

2006-07-24 Thread Fariborz Jahanian
On Jul 24, 2006, at 3:07 PM, Andrew Pinski wrote: gcc generates two separate trees for compound literals in c and c++. As in this test case: struct S { int i,j; }; void foo (struct S); int main () { foo((struct S){1,1}); } On the other hand, such a guard does not e

Re: Use of compound_literal_expr in c vs target_expr in c++ for compound literals

2006-07-24 Thread Andrew Pinski
> > > gcc generates two separate trees for compound literals in c and c++. > As in this test case: > > struct S { > int i,j; > }; > void foo (struct S); > > int main () > { > foo((struct S){1,1}); > } > On the other hand, such a guard does not exist for a > compound_

Use of compound_literal_expr in c vs target_expr in c++ for compound literals

2006-07-24 Thread Fariborz Jahanian
gcc generates two separate trees for compound literals in c and c++. As in this test case: struct S { int i,j; }; void foo (struct S); int main () { foo((struct S){1,1}); } In c it generates compound_literal_expr and in c++ it generates target_expr. But gimplifier treats