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: [Committed] Fix bootstrap on x86_64 with recent build_string change


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


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