Semantics of MODIFY_EXPR with CONSTRUCTOR rhs
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Mon Aug 2 12:52:00 GMT 2004
There's nothing "undefined" in Ada in the second assignment, and that's
what the test is checking.
Sure. But we can't always say that the semantics of a GENERIC node (in
this case CONSTRUCTOR) are defined to be that of the union of all languages
that use them: we have to decide on a case-by-case basis. For example,
the case of X MOD -1 is dealt with in the Ada front end.
However, the arguments for defining the Ada behavior as that of the
CONSTRUCTOR node in this case are (1) it used to be that way
pre-tree-ssa and (2) it's easier for the middle-end to check for lack
of conflict than the front end.
If we decide that this behavior is only needed for Ada, we can certainly
add a language hook to say if we need to do it so we don't pessimize other
language. But it sounds like it might be needed elsewhere too, though
from what I can see, I'm not sure.
More information about the Gcc
mailing list