[6865] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 7.2P: saber 2.1

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Thu Jan 10 16:00:19 1991

Date: Thu, 10 Jan 91 15:59:55 -0500
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: vanharen@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: bugs[6852]


  This is almost certainly an intentional thing, not a missing feature
or a bug.

  Note that for functions declared as returning anything other than
int, saber *does* report when loading the function that it does not
return a value.

  Note further that when running a program inside saber, an error
*will* be reported if the program attempts to use the return value of
an int function that does not return a value.

  In other words, I suspect that saber is intentionally designed not
to report int functions that don't return, because for a long time,
functions that didn't return a value were declared as int (or declared
with no type, so that they defaulted to int).

  You *may* be able to convince me that if ansi mode is enabled,
int functions should be treated just like any other.  I'd say that all
it would take to convince me of this (and report it back to saber)
would be a mail message from you agreeing that they should be :-).

 Jonathan Kamens
 Project Athena Quality Assurance

Reference:

   From: vanharen@ATHENA.MIT.EDU
   Date: Wed, 9 Jan 91 15:55:04 -0500

   System name:		fries
   Type and version:	CVAXSTAR 7.2P
   Display type:		SM

   What were you trying to do?
	   Use saber to catch programming errors.

   What's wrong:
	   saber doesn't catch functions that don't return values (that
	   should).  This may not be a bug -- consider it an enhancement
	   request.

   What should have happened:
	   If a function is declared as "int foo() {...}", it should
	   complain if there is no "return" statement.  HC catches this
	   error, as does "gcc -Wall".

   Please describe any relevant documentation references:
	   N/A.


home help back first fref pref prev next nref lref last post