Semantics of MODIFY_EXPR with CONSTRUCTOR rhs
Laurent GUERBY
laurent@guerby.net
Mon Aug 2 10:59:00 GMT 2004
On Mon, 2004-08-02 at 12:48, Gabriel Dos Reis wrote:
> There are two issues, made distinct in RTH's message:
>
> (1) initialization
> (2) assignment.
>
> My comments was made in the context of C99 semantics.
> Assignment uses a copy. Initialization with self-reference may have
> indeterminate value.
Okay, I was just making sure we were talking about the right problem,
thanks for the precision on C99. The problem Richard Kenner is seeing is
only (2), (1) is not a problem in Ada since this kind of construction is
illegal at compile time, and you get an error message from GCC:
A : R := (1, A.X);
object "A" cannot be used before end of its declaration
Laurent
More information about the Gcc
mailing list