From -7227047678939692393
X-Google-Thread: f78e5,e2cfdf64f67c7793
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.glorb.com!prodigy.com!atl-c02.usenetserver.com!news.usenetserver.com!peer01.cox.net!cox.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: brangdon@cix.co.uk (Dave Harris)
Newsgroups: comp.std.c++
Subject: Re: Eliminating uninitialised variables
Date: Wed, 22 Sep 2004 17:47:56 GMT
Lines: 27
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <memo.20040922084130.2520A@brangdon.m>
References: <kosvk0dvna0cabbu623cjhn5trcfn85u8n@4ax.com>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1095875285 1527 158.152.254.254 (22 Sep 2004 17:48:05 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 22 Sep 2004 17:48:05 +0000 (UTC)
X-Received-SPF: none (mailbox7.ucsd.edu: domain of mod-submit@uni-berlin.de does not designate permitted sender hosts)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Orig-X-Trace: news.uni-berlin.de pAGhfrfhF2nf6mYAuEXSngoiWaX4JBYY7q6N7RspIzE3Pwgq4=
X-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Reply-To: brangdon@cix.co.uk
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i8MHluW8019689;
	Thu, 23 Sep 2004 03:47:56 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox7.ucsd.edu  (v1.5 Aug 25 2004 09:28:35, -2.8/5.0 3.0.0-rc1)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 27643 i8M7fVOY030728 mailbox7.ucsd.edu)
Xref: g2news1.google.com comp.std.c++:2833

invalid@bigfoot.com (Bob Hairgrove) wrote (abridged):
> It would be fairly easy to require either malloc or operator new to
> zero-initialize all storage it allocates.

If operator new is written by the user, such a requirement would break 
backwards compatibility. 


> >What else am I missing? This is surely the kind of thing which future 
> >revisions of the C++ standard should be considering.
> 
> I don't think it is worth doing. Zero-initialization doesn't really
> make sense for object type members, anyway.

Perhaps I used the wrong phrase. I meant the kind of initialisation static 
objects get. For built-in types, that's as if they were initialised from 
zero. Of course the final bit-pattern may not be zero, and of course 
user-defined types have their default constructors.

-- Dave Harris, Nottingham, UK

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



