Skip to content
Snippets Groups Projects
  • Thomas Schwinge's avatar
    62db795a
    GTY: Enhance 'string_length' option documentation · 62db795a
    Thomas Schwinge authored
    We're (currently) not aware of any actual use of 'ht_identifier's with NUL
    characters embedded; its 'len' field appears to exist for optimization
    purposes, since "forever".  Before 'struct ht_identifier' was added in
    commit 2a967f3d (Subversion r42334), we had in
    'gcc/cpplib.h:struct cpp_hashnode': 'unsigned short len', or earlier 'length',
    earlier in 'gcc/cpphash.h:struct hashnode': 'unsigned short length', earlier
    'size_t length' with comment: "length of token, for quick comparison", earlier
    'int length', ever since the 'gcc/cpp*' files were added in
    commit 7f2935c7 (Subversion r9191).
    
    This amends commit f3b957ea
    "pch: Fix streaming of strings with embedded null bytes".
    
    	gcc/
    	* doc/gty.texi (GTY Options) <string_length>: Enhance.
    	libcpp/
    	* include/symtab.h (struct ht_identifier): Document different
    	rationale.
    62db795a
    History
    GTY: Enhance 'string_length' option documentation
    Thomas Schwinge authored
    We're (currently) not aware of any actual use of 'ht_identifier's with NUL
    characters embedded; its 'len' field appears to exist for optimization
    purposes, since "forever".  Before 'struct ht_identifier' was added in
    commit 2a967f3d (Subversion r42334), we had in
    'gcc/cpplib.h:struct cpp_hashnode': 'unsigned short len', or earlier 'length',
    earlier in 'gcc/cpphash.h:struct hashnode': 'unsigned short length', earlier
    'size_t length' with comment: "length of token, for quick comparison", earlier
    'int length', ever since the 'gcc/cpp*' files were added in
    commit 7f2935c7 (Subversion r9191).
    
    This amends commit f3b957ea
    "pch: Fix streaming of strings with embedded null bytes".
    
    	gcc/
    	* doc/gty.texi (GTY Options) <string_length>: Enhance.
    	libcpp/
    	* include/symtab.h (struct ht_identifier): Document different
    	rationale.