[Bug c/14661] [3.3?/3.4/3.5 Regression] ?: operator result structure's member array can't be assigned to pointer

jsm at polyomino dot org dot uk gcc-bugzilla@gcc.gnu.org
Mon Mar 22 09:52:00 GMT 2004


------- Additional Comments From jsm at polyomino dot org dot uk  2004-03-22 09:52 -------
Subject: Re:  [3.3? Regression] ?: operator result structure's
 member array can't be assigned to pointer

On Mon, 22 Mar 2004, bangerth at dealii dot org wrote:

> In C, the result of the ?: operator is an rvalue, i.e. 
>   ( i ? a : b ) 
> is a temporary of type A, and taking the address of its member 
> is assigning the address of a temporary to the result variable. 
> That should be legal, but should also yield undefined behavior. 

But only C99 allows the non-lvalue array to convert to a pointer like
that.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14661



More information about the Gcc-bugs mailing list