This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Canonicalize &a to &a[0] during fold


On Sun, 24 Apr 2005, Richard Henderson wrote:

> On Sun, Apr 24, 2005 at 07:15:01PM +0200, Richard Guenther wrote:
> > 	* fold-const.c (fold_unary): Fold decayed array a to &a[0].
>
> I'd kinda prefer this get fixed in the front ends instead of doing
> this in fold...

I would have come up with followups that also replace
(a + i) with &a[i].  Should this also be fixed in the frontends?
I.e. the C frontend currently would need tweaking.

The downside is that we "tie" the frontends closer to the middle-end
this way.

I'll prepare a patch for the C frontend.

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]