This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix PR libstdc++/19510: Uninitialized variable in some iterators
Chris Jefferson <caj@cs.york.ac.uk> writes:
[...]
| >We have a default-initialisation (to zero in this case), rather than an
| >indeterminate value. IMHO any slight overhead is worth it.
| >
| Hmm.. I would tend to say the "C++" way was to never default initalise
well, that is not "C++" way. That is something inherited from C, and
preseved there more for inertia or alleged efficiency of POD in
general than in specific cases at hand. Here we're talking about
inline initialization of a class member. I also see no reason to dump
annoying messages on users about which he/she can do nothing.
How do you know under the debugger that a list iterator is singular?
Do you prefer to see a null pointer value or some values you cannot
say off hand are valid or not?
-- Gaby