This is the mail archive of the gcc-bugs@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]

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


------- 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


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