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 expand_builtin_stpcpy to only expand for string constants


On Sun, May 04, 2003 at 03:01:40PM -0400, Kaveh R. Ghazi wrote:
> I needed `len' as a tree (+1) to add it as the third argument needed
> by expand_builtin_memcpy.  So since I had gotten `len' I checked it.

I missed that, sorry. Anyway, third alternative is to call both
c_getstr and c_strlen, but swap the order, ie. do if (!c_getstr()) return 0;
and len = c_strlen(); afterwards (this should be faster if
c_strlen returns non-NULL and c_getstr NULL, which is rare, so it probably
doesn't matter).

	Jakub


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