This is the mail archive of the 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 some iterators

On Thu, Jan 20, 2005 at 07:11:28PM -0800, Mark Mitchell wrote:

> My understanding is that the initialization being added is not required 
> by the standard for the library (as opposed to the part of the standard 
> that talks about acessing uninitialized values), but is required on 
> certain architectures where copying uninitialized values is not allowed. 

The proposed resoltion to library DR 408, which Martin pointed out, says:

  [ We don't want to require all singular iterators to be copyable,
  because that is not the case for pointers. However, default
  construction may be a special case. Issue: is it really default
  construction we want to talk about, or is it something like value
  initialization? We need to check with core to see whether default
  constructed pointers are required to be copyable; if not, it would be
  wrong to impose so strict a requirement for iterators. ]

which implies it's an open issue whether uninit'd pointers are
copyable. I think this is also related:

As I think Gaby pointed out, debugging is easier if singular pointers
are set to zero, not some random bit pattern.


"I always keep a supply of liquor handy in case I see a snake,
 which I also keep handy."
	- W.C. Fields

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