[6467] in Athena Bugs

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

rt 7.1H: hc 2.1y

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Mon Nov 26 18:45:45 1990

Date: Mon, 26 Nov 90 18:45:28 -0500
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: bugs@ATHENA.MIT.EDU

System name:		pit-manager
Type and version:	RTPC-ROMPC 7.1H
Display type:		apa16
			megapel

What were you trying to do?
	Something I shouldn't have been doing -- declare a function
	with "..." to show a variable argument list, and then later
	define the function using <varargs.h> instead of a <stdarg.h>
	compatible with the hc method of dealing with "...".

What's wrong:
	Hc did not detect that the function definition was not
	compatible with the declaration.

What should have happened:
	It should have printed either a warning or an error.  I'm
	don't know enough about the ANSI C spec to know which it
	should have been.

Please describe any relevant documentation references:
	The file below compiles without error using hc.  It shouldn't.

  jik

---- cut here ----
#include <varargs.h>

void test(int, ...);

void test(va_alist)
va_dcl
{
     return;
}


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