This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trunk][patch] gimplify type sizes in a pointer type
Rafael Espindola wrote:
> The problem I am having is with an array type that is only reachable
> via the a pointer type to it. Is there an easy way to detect this?
It sounds like you would need for C++ something similar to what
we ended up doing for C (approved change at
http://gcc.gnu.org/ml/gcc-patches/2006-10/txt00006.txt, previous
attempt and discussion upthread).
The general idea is to leave the front-ends responsible of triggering
the type size evaluation at the right point, and we added code for
this purpose to handle some cases of anonymous pointed-to types in C.
I'm totally unfamiliar with the C++ front-end so I'm not sure if your
issue is indeed the same and if a similar solution could apply.
> Another option is to have a mini second gimplification pass.
gimplification is already a fairly complex process IMHO, so
I hope we won't have to go there.
Olivier