home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!spool.mu.edu!agate!linus!linus.mitre.org!linus!mbunix!eachus
- From: eachus@oddjob.mitre.org (Robert I. Eachus)
- Subject: Re: Language pitfalls (was Re: FORTRAN bug)
- In-Reply-To: stt@spock.camb.inmet.com's message of Tue, 15 Dec 1992 20:35:58 GMT
- Message-ID: <EACHUS.92Dec15202249@oddjob.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: oddjob.mitre.org
- Organization: The Mitre Corp., Bedford, MA.
- References: <1992Dec15.135539.7245@lth.se> <EMERY.92Dec15095542@dr_no.mitre.org>
- <1992Dec15.180821.17817@beaver.cs.washington.edu>
- <1992Dec15.203558.18211@inmet.camb.inmet.com>
- Date: Wed, 16 Dec 1992 01:22:49 GMT
- Lines: 28
-
- In article <1992Dec15.203558.18211@inmet.camb.inmet.com> stt@spock.camb.inmet.com (Tucker Taft) writes:
-
- Oh boy. That is a nasty one. This argues for a "friendly"
- Ada compiler giving a warning about any use of "null;" other
- than the idiomatic ones like "when others => null;" or "begin null; end;"
- (especially in a function that returns an access type ;-).
-
- In retrospect, one could argue that it would have been better
- to have no "null" statement at all (other than simply ";") than
- to create a situation allowing this kind of one word error.
-
- Actually, there is an Ada rule which normally catches this, and
- which Robert Dewar and I have argued should be removed in Ada 9X. (A
- function must contain a return statement RM 6.5(1).) If it belongs on
- the top ten list, then the rule should stay.
-
- (What Robert Dewar and I objected to was that certain functions
- whose only intended effect is to raise an exception must still contain
- a return statement. This results in junk return statements in stubbed
- out code, and makes a stubber much harder to write.)
-
- --
-
- Robert I. Eachus
-
- with Standard_Disclaimer;
- use Standard_Disclaimer;
- function Message (Text: in Clever_Ideas) return Better_Ideas is...
-