This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR libstdc++/19510: Uninitialized variable in someiterators



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]