This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bug 16115, C++ invisible references
Richard Henderson wrote:
Certainly, unlowered EDG IL is semantic, in the sense that it would be
easy to execute.
Well then, they've certainly done something different with their
scopes than we have. I'm guessing statement-like things that
push/pop the scope? More or less what we had with SCOPE_STMT?
That's all well and good, but GENERIC doesn't work that way. It
wants strictly nested constructs. I think any attempt to mix a
strictly-nested style with one that is not strictly nested
(as with C++ {IF,WHILE,FOR,SWITCH}_STMT), will result in Ugly Warts.
Their stuff is more like the FOR_STMT sytle, but they don't have
anything like SCOPE_STMT. They do have a scope tree, though.
I don't think what they have is strictly nested, but it's close.
I'm not keen on mixing, and I've got no beef with GENERIC; I just want
to see that the transformation to GENERIC happen separately.
For example, I'd expect that:
for (int i = 0; i < 10; ++i) ...
be transformed so that the declaration of "i" was pulled out into a new
scope, ala:
{ int i = 0;
for (; i < 10; ++i) ...
}
by the lowering phase.
That's when I'd expect Jason's parameter-type manipulations to happen as
well.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com