[PATCHv2] Handle overlength strings in C++ FE

Jason Merrill jason@redhat.com
Wed Aug 29 22:18:00 GMT 2018


On Fri, Aug 24, 2018 at 4:02 PM, Bernd Edlinger
<bernd.edlinger@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.

Jason



More information about the Gcc-patches mailing list