[PATCH] Fix PR libstdc++/19510: Uninitialized variable in some iterators
Chris Jefferson
caj@cs.york.ac.uk
Thu Jan 20 13:04:00 GMT 2005
>But copying singular iterators is explicitly disallowed, isn't it?
>
>24.1/5:
> Iterators can also have singular values that are not associated with
> any container. [Example: After the declaration of an uninitialized
> pointer x (as with int* x;), x must always be assumed to have a
> singular value of a pointer. ] Results of most expressions are
> undefined for singular values; the only exception is an assignment of
> a nonsingular value to an iterator that holds a singular value. In
> this case the singular value is overwritten the same way as any other
> value.
>
>This explicitly mentions the case of uninitialised pointers being
>singular.
>
>
>
Just a quick note. 8.3.1/2, the line "pc = p", shows you can copy
uninitalised pointers.
Chris
More information about the Libstdc++
mailing list