Compile errors on V/386 3.0E

John Plocher plocher at uport.UUCP
Mon Dec 12 07:37:27 AEST 1988


In article <417 at zinn.MV.COM> mem at zinn.MV.COM (Mark E. Mallett) writes:
>In article <680 at wa3wbu.UUCP> john at 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 <signal.h>)

		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



More information about the Comp.unix.microport mailing list