On Thu, Aug 30, 2018 at 2:55 AM, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > On 08/30/18 00:17, Jason Merrill wrote: >> On Fri, Aug 24, 2018 at 4:02 PM, Bernd Edlinger >> <bernd.edlin...@hotmail.de> wrote: >>> Hi! >>> >>> >>> This is an alternative approach to handle overlength strings in the C++ FE. >>> >>> The difference to the previous version is that overlength >>> STRING_CST never have a longer TREE_STRING_LENGTH than the TYPE_DOMAIN. >>> And those STRING_CSTs are thus no longer zero terminated. >>> >>> Bootstrapped and reg-tested on x86_64-pc-linux-gnu. >>> Is it OK for trunk? >> >>> + *value_ptr = len1++; >> >> Is a trailing NUL actually needed for this data structure, given that >> the length is explicitly provided? If it is, you also need to add one >> at the end of the buffer. > > No, it's not needed. > So I'll drop that hunk.
The rest of the patch is OK. Jason