home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!psinntp!calspan!westley
- From: westley@calspan.com (Terry J. Westley)
- Subject: Re: Language pitfalls (was Re: FORTRAN bug)
- Message-ID: <1992Dec17.141856.10631@calspan.com>
- Sender: usenet@calspan.com
- Nntp-Posting-Host: hercules
- Organization: Calspan Advanced Technology Center
- References: <1992Dec15.180821.17817@beaver.cs.washington.edu> <1992Dec15.203558.18211@inmet.camb.inmet.com> <EACHUS.92Dec15202249@oddjob.mitre.org>
- Date: Thu, 17 Dec 1992 14:18:56 GMT
- Lines: 39
-
- In article <EACHUS.92Dec15202249@oddjob.mitre.org> eachus@oddjob.mitre.org (Robert I. Eachus) writes:
- > Actually, there is an Ada rule which normally catches this,
-
- ["this" refers to substituting "null" for "return null" by mistake]
-
- >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
-
- Many compilers produce a warning for such a situation. IMHO, this is
- good but doesn't go far enough.
-
- I hate compiler warnings; I will typically do anything to eliminate them
- because I done't want to keep rereading the same warnings every time a unit
- is compiled. Sometimes, they cannot be eliminated as in the example above.
-
- I would like to have the ability, perhaps with a pragma, which allows me to
- tell the compiler that I know a certain statement will raise a warning of
- a certain class and to suppress the warning. This must be done on a statement
- by statement (really warning by warning) basis. Turning off all the warnings
- is too dangerous. They really are useful.
-
- Have any compiler gurus considered this?
-
- --
- Terry J. Westley, Principal Computer Scientist
- Calspan Corporation, P.O. Box 400, Buffalo, NY 14225
- westley@calspan.com
- Let's hear it for smart mailers that cut off long signa
-