From -1925962669085484361
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!news.zanker.org!news.clara.net!wagner.news.clara.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: esben@despammed.com (Esben Mose Hansen)
Newsgroups: comp.std.c++
Subject: Re: Eliminating uninitialised variables
Date: Fri,  8 Oct 2004 20:22:49 GMT
Organization: TDC Totalloesninger
Lines: 33
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <4166ebbe$0$237$edfadb0f@dread12.news.tele.dk>
References: <memo.20040920104138.384A@brangdon.m> <41573b0a$0$29917$cc9e4d1f@news.dial.pipex.com> <2rsojaF1cph0rU1@uni-berlin.de>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: news.demon.co.uk 1097266974 14700 158.152.254.254 (8 Oct 2004 20:22:54 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 8 Oct 2004 20:22:54 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: KNode/0.7.7
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i98KMn5x028094;
	Sat, 9 Oct 2004 06:22:49 +1000 (EST)
X-Spam-Level: 
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:3023

Peter van Merkerk wrote:

> Stephen Howe wrote:

>> I have to say in the past 5 years, I have not been bitten once by
>> "uninitialised variables".

> That doesn't mean there aren't any in the code you written, and it might
> surface at the worst possible time. The problem with uninitialized
> variables is that the code may work just fine on your system, and pass
> all tests and yet blow up in the face of the customer. If you lurk
> around newsgroups you do see every now and then people asking why debug
> builds work fine and release builds fail miserably. This is typically
> caused by uninitialized variables.

http://valgrind.kde.org/ would be your friend, here. As a bonus, your code
get tested for memory leaks, too.

Once upon a time, it was said that one tool should do one job only. Now a
days compilers seems to be required to do some (rather poor) linting as
well. Why is this?

-- 
mvh. Esben Mose Hansen 
homepage: www.mosehansen.dk --xxx-- GPG fingerprint:
www.mosehansen.dk/about.html

---
[ 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                       ]



