[4158] in Athena Bugs

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

Saber msg: v2.1 (4/24/89 lycus vax Unix 4042 0)

daemon@ATHENA.MIT.EDU (jtkohl@ATHENA.MIT.EDU)
Wed Feb 7 15:24:58 1990

From: jtkohl@ATHENA.MIT.EDU
Date: Wed, 7 Feb 90 15:24:21 -0500
To: bugs@ATHENA.MIT.EDU
Cc: jtkohl@ATHENA.MIT.EDU
Saber in ANSI mode doesn't seem to know about promotion of arguments
[e.g. when passing a 'short', it is actually passed as an integer,
and the prototype must say 'int' for the parameter.]

Here's a sample file exhibiting the problem:
int foofunc(int);

int
foofunc(val)
short val;
{
    return val*2;
}

and saber's response:
"foo.c":5, foofunc(), Function redeclared (Warning #340)
     4: foofunc(val)
 *   5: short val;
     6: {
Function 'foofunc' was previously declared as:
    extern int foofunc(int);
(If you continue, the previous declaration will be ignored.)


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