[PATCH] Handle read-only vars initialized to string literals in c_strlen

Jakub Jelinek jakub@redhat.com
Mon Sep 13 18:24:00 GMT 2004


On Mon, Sep 13, 2004 at 11:36:47AM -0600, Jeffrey A Law wrote:
> > > > Please don't add this here, add it in the tree optimizers instead.
> > >
> > > Umm, string_constant is a utility routine used by the folder
> > > (and thus the tree optimizers).
> > 
> > Hmm I see.  When I saw expr.c, I figured it would be part of the
> > expanders, like the folding of constant initializers that's done
> > there.  But nothing in expr.c uses string_constant.
> > So, no probblem then :-)
> The function probably ought to move into fold-const.c or something
> like that.

Yes, either fold-const.c or builtins.c.
Though I think it should be done as a separate patch.

	Jakub



More information about the Gcc-patches mailing list