Path: utzoo!attcan!uunet!uport!plocher From: plocher@uport.UUCP (John Plocher) Newsgroups: comp.unix.microport Subject: Re: Compile errors on V/386 3.0E Summary: signal is declared as type void Message-ID: <273@uport.UUCP> Date: 11 Dec 88 21:37:27 GMT References: <680@wa3wbu.UUCP> <417@zinn.MV.COM> Reply-To: plocher@uport.UUCP (John Plocher) Organization: Microport Systems, Scotts Valley, CA Lines: 39 In article <417@zinn.MV.COM> mem@zinn.MV.COM (Mark E. Mallett) writes: >In article <680@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes: >> >> [ with green hills ] >> >> cc -O ... -c control.c >>"control.c", line 898: warning: illegal pointer combination, op = ... > > perhaps the signal.h for green hills compiler doesn't >[properly] declare the signal() routine, or worse, doesn't properly >implement it. It should be declared: > > extern (*signal())(); NO! In ATT System Vr3 (Microport's V/386 2.2 & 3.0e, ISC's 1.0x, BT's 3.0...) signal() was changed to be of type void. This is different from almost everyone else (uugh!) but that's how AT&T did it. (from ) extern void(*signal())(); extern void(*sigset())(); The news code assumes signal() is of type int; signal.h declares it as type void, and the compiler says "oops", just like it should. The >>warning<< >>seems<< to be ignorable. Under the DIAGNOSTICS section of signal(2) it says: "Upon successful completion, SIGNAL returns the previous value of FUNC for the specified signal SIG. Otherwise a value of SIG_ERR is returned and errno is set to indicate the error. SIG_ERR is defined in the include file SIGNAL.H." I thought type void meant "nothing returned", yet signal is clearly type void and it returns something! What don't I understand here? :-) John Plocher