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? Regression] ?: operator result structure's member array can't be assigned to pointer


------- Additional Comments From bangerth at dealii dot org  2004-03-22 02:20 -------
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. 
 
W. 

-- 


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]