comp.lang.ada
 help / color / mirror / Atom feed
From: psinntp!calspan!westley@uunet.uu.net  (Terry J. Westley)
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Date: 17 Dec 92 14:18:56 GMT	[thread overview]
Message-ID: <1992Dec17.141856.10631@calspan.com> (raw)

In article <EACHUS.92Dec15202249@oddjob.mitre.org> eachus@oddjob.mitre.org (Rob
ert 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

             reply	other threads:[~1992-12-17 14:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-17 14:18 Terry J. Westley [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-12-17 18:48 Language pitfalls (was Re: FORTRAN bug) John Halper
1992-12-17  1:31 Robert I. Eachus
1992-12-16 20:59 John Bollenbacher
1992-12-16 20:02 Julian C . Lander
1992-12-16 17:38 Bob Kitzberger
1992-12-16 17:27 Mark A Biggar
1992-12-16 16:32 olivea!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!asuvax!ennews
1992-12-16 14:38 crispen
1992-12-16  1:22 Robert I. Eachus
1992-12-15 20:35 news.centerline.com!noc.near.net!inmet!spock!stt
1992-12-15 18:08 Richard Pattis
1992-12-15 15:47 Michael Feldman
1992-12-15 14:55 David Emery
1992-12-15 13:55 enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.lth.se!dag
1992-12-14 21:57 Bob Kitzberger
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox