On Wed, Jul 5, 2023 at 9:57 AM Thomas Schwinge <tho...@codesourcery.com> wrote:
>
> Hi!
>
> On 2023-07-04T15:56:23-0400, Lewis Hyatt via Gcc-patches 
> <gcc-patches@gcc.gnu.org> wrote:
> > On Tue, Jul 4, 2023 at 11:50 AM Thomas Schwinge <tho...@codesourcery.com> 
> > wrote:
> >> I came across this one here on my way working through another (somewhat
> >> related) GTY issue.  I generally do understand the issue here, but do
> >> have a question about 'unsigned int len' field in
> >> 'libcpp/include/symtab.h:struct ht_identifier': [...]
>
> > I don't think there is currently any possibility for a null byte to
> > end up in an ht_identifier's string. I assumed that ht_identifier
> > stores the length as an optimization (especially since it doesn't take
> > up any extra space on 64-bit platforms, given the 32-bit hash code is
> > stored as well there.) I created the string_length GTY markup mainly
> > to support another patch that I have still pending review, which I
> > thought would increase the likelihood of PCH needing to handle null
> > bytes in general. When I did that, I added the markup to ht_identifier
> > simply because the length was already there, so there was no reason
> > not to add it. It does save a few cycles when streaming out the PCH,
> > but I doubt it is meaningful.
>
> Thanks for confirming.  OK thus to push the attached
> "GTY: Enhance 'string_length' option documentation"?

OK.

> Grüße
>  Thomas
>
>
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
> München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
> Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
> München, HRB 106955

Reply via email to