This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR libstdc++/19510: Uninitialized variable in some iterators
Chris Jefferson <email@example.com> 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?