C++ PATHC: PR5571
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sat Apr 13 12:29:00 GMT 2002
> I'm not sure exactly what you are suggesting, though. If you have to
> call make_decl_rtl for a VAR_DECL when its type become complete, that
> implies you have some way of finding all decls for that type. Do you?
In the C++ front end, we do. There's no reason that, in any front end,
you couldn't keep track of what variables you've created with incomplete
types.
Well, the C front end doesn't, though I agree it *could*.
Exactly my point. The solution currently in expand_expr is designed
to help you do things automatically -- the middle end fixes up the RTL
for your variable for you. But, that depends on you having completed
the type already, which, for arrays, means that you have to have gone
back and done that. And if you can find the type, you can probably
find the declaration, so you might as well fix that up too.
Yes and no. I think the basic question is whether we want "incomplete
type" to be totally a front-end concept or have the middle end deal
with it as well.
Having the middle end call layout_decl is indicative of a failure to
adhere to that strategy: the middle end is now modifying trees.
I agree with this.
More information about the Gcc-patches
mailing list