This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14661] [3.3? Regression] ?: operator result structure's member array can't be assigned to pointer
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2004 02:21:02 -0000
- Subject: [Bug c/14661] [3.3? Regression] ?: operator result structure's member array can't be assigned to pointer
- References: <20040320011934.14661.dmj36@email.byu.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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