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

Re: Semantics of MODIFY_EXPR with CONSTRUCTOR rhs


Laurent GUERBY <laurent@guerby.net> writes:

| 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

Okayyy.  Thanks,

-- Gaby


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