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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!news-xfer.cox.net!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: Checking for Undefined Date: Thu, 25 May 2006 23:02:24 +0100 Organization: Pushface Message-ID: References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <2006052509454116807-gsande@worldnetattnet> <4475DA0F.5030603@comcast.net> <2006052514574816807-gsande@worldnetattnet> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1148594559 27524 62.49.19.209 (25 May 2006 22:02:39 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 25 May 2006 22:02:39 +0000 (UTC) Cancel-Lock: sha1:Q+mqD8NhBF8tqNWTq6mn/i7tv8g= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:4474 comp.lang.fortran:10258 comp.lang.pl1:1721 Date: 2006-05-25T23:02:24+01:00 List-Id: Gordon Sande writes: > I am getting the impression from the silence of the cross postings > that undefined checking has only shown up in Fortran systems. The > exception is Salford who also have it for their C but one also seems > to notice that their C and Fortran seem to share a lot of features. The pro version of GNAT (I don't know about the FSF version) has optional initialization with out-of-range values and checking even in places where it normally would be omitted because the compiler would assume it had already done the checks. This only works if there _are_ out-of-range values, so Integer can't be checked. Normally the recommendation is to define types appropriate to the application, so checks are possible. My current project is using an older compiler which is imperfect in this area, so we don't use this feature, but compiler warnings such as 'X may be used before initialization' are very valuable.