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: [PATCHv2] Handle overlength strings in C++ FE


On 08/30/18 00:17, Jason Merrill wrote:
> 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.
> 

No, it's not needed.
So I'll drop that hunk.


Bernd.

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