From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,HEADER_SPAM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-ArrivalTime: 2003-06-16 15:52:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!uwm.edu!rpi!not-for-mail From: "Ron Natalie" Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 16 Jun 2003 18:54:21 -0400 Organization: unknown Sender: cppmods@netlab.cs.rpi.edu Message-ID: References: <1054751321.434656@master.nyc.kbcfp.com> NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: Mon, 16 Jun 2003 09:26:47 -0400 X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPu5KkUHMCo9UcraBAQHwpgH9GL2NUP/swLtntVCabHW9unLanRJax65H fEk7s0vfd7ecxYYzBkoT93oeIWIRQgiwzNewyAWK6M6KV6G3FmfCOw== =ZdfM Xref: archiver1.google.com comp.lang.ada:39297 comp.lang.c++.moderated:68477 Date: 2003-06-16T18:54:21-04:00 List-Id: "Terje Sletteb�" wrote in message news:iPDGa.11691$KF1.273533@amstwist00... > Anyway, this may be a QoI issue. A compiler could warn if an > uninitialised variable is read from, and they typically do. > > It is not a QoI issue. The above was a trivial case to counter a previous poster. The compiler is NOT able to tell in general (for example, POD elements in a dynamically allocated class). It's an egregious violation of the C++ object model to just forget to perform default initialization. [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]