This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix wrong gimple code with ptr to forward vla
Mark Mitchell wrote:
> If you made the C front end explictly declare the type, then the
> type-elaboration approach would work as expected, and Jakub's patch
> could be removed. That would be a logically coherent approach, and
> we could always switch to Joseph's approach in the fullness of time.
> Perhaps Jakub would be willing to help with that, if you get stuck?
That would be much appreciated, thanks.
I'll have a first look as soon as possible, but as I said this is
"new" code to me so will possible take a bit of time. It's also not
yet entirely clear which exact set of constructs need to be addressed.
What about C++, btw ? Do you think it would need inspection as well ?
The testcase I posted is currently rejected, but maybe legal variants
would be affected as well.
Other languages ?
> I think that checking for non-TYPE_DECL ness is a little better than
> anonymity; at least, we'd be checking for a semantic property. However,
> given the situation outlined in the previous paragraph, it's pretty
> questionable: we're admitting the existence of variable-sized types
> without TYPE_DECLs, which means that there is no well-defined point at
> which the bounds should be calculated. In particular, I don't think
> "the first time you encounter that type" is that well-defined.
>
> But, I would be more accepting of the no-TYPE_DECL test than the no-name
> test, if we have to choose between those two.
Understood. Thanks for your feeddback.
Olivier