aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.h
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-12-12 20:42:19 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-12-16 14:05:10 +0000
commitf1309dbc7c281dc9fd70db8ec6e8cb804b2089fc (patch)
tree0103a392fcfc331aa94a08299afc29cf2d1d8053 /gcc/tree-inline.h
parentfdfd0640ab7eddb24486214361c672d1b6d8a068 (diff)
downloadgcc-f1309dbc7c281dc9fd70db8ec6e8cb804b2089fc.zip
gcc-f1309dbc7c281dc9fd70db8ec6e8cb804b2089fc.tar.gz
gcc-f1309dbc7c281dc9fd70db8ec6e8cb804b2089fc.tar.bz2
libstdc++: Initialize all members of hashtable local iterators
Currently the _M_bucket members are left uninitialized for default-initialized local iterators, and then copy construction copies indeterminate values. We should just ensure they're initialized on construction. Setting them to zero makes default-initialization consistent with value-initialization and avoids indeterminate values. For the _Local_iterator_base<..., false> specialization we preserve the existing behaviour of setting _M_bucket_count to -1 in the default constructor, as a sentinel value to indicate there's no hash object present. libstdc++-v3/ChangeLog: * include/bits/hashtable_policy.h (_Local_iterator_base): Use default member-initializers.
Diffstat (limited to 'gcc/tree-inline.h')
0 files changed, 0 insertions, 0 deletions