This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] Fix bootstrap on x86_64 with recent build_string change
- From: Jason Merrill <jason at redhat dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jun 2006 21:00:14 -0400
- Subject: Re: [Committed] Fix bootstrap on x86_64 with recent build_string change
- References: <de8d50360606291051w68ddeaf9sa64b2db3c45bc8e3@mail.gmail.com>
I ran into this problem too, and came up with the same fix.
While I was investigating it, I noticed that callers of build_string are
very inconsistent about whether or not the length parameter should
include the terminal NUL. It seems that historically it was supposed
to, but this isn't documented, many callers don't include it,
build_string doesn't expect it, and it seems surprising for
TREE_STRING_LENGTH to include the terminal NUL while IDENTIFIER_LENGTH
doesn't. I think we ought to document that TREE_STRING_LENGTH does
*not* include the terminal NUL and unify the users accordingly.
Jason