comp.lang.ada
 help / color / mirror / Atom feed
* Pet Peeve
@ 1993-02-14 22:48 Kenneth Anderson
  0 siblings, 0 replies; only message in thread
From: Kenneth Anderson @ 1993-02-14 22:48 UTC (permalink / raw)


In comp.lang.ada Adam Beneschan writes:

>    function "*" (left, right : APPLES) return APPLES is
>    begin
>        raise PROGRAM_ERROR;
>        return 0.0;     -- Ada won't let us write a function that just raises
>                        -- an exception without returning anything!
>    end "*";


This is off the subject that Adam is talking about, but this example
displays one of my Pet Peeves.

If you compile a file with a function like the one above using the SunAda
compiler with this command

a.make -v -C "ada -v -ev" -f *.a

The compiler inserts warning statements into the source file telling you
that the return statement will never be reached.  Since the source file
is modified, the a.make command thinks that the program is out of date,
so that the NEXT time that you recompile with the above command it recompiles
this file, even though it doesn't need to be recompiled.

This can be avoided by using the following command

a.make -v -f *.a

but then you can't correct any errors that are found "on the fly"


Grrrrr.

Thanks for letting me vent a little steam...

Ken

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-02-14 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-02-14 22:48 Pet Peeve Kenneth Anderson

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