Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!shlump.nac.dec.com!tkou02.enet.dec.com!jit345!diamond From: diamond@jit345.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.std.c Subject: Re: proper semi-portable use of signal()? Message-ID: <1991Mar27.014048.18198@tkou02.enet.dec.com> Date: 27 Mar 91 01:40:48 GMT References: <3223@charon.cwi.nl> Sender: news@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit345.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 25 In article <3223@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >... the declaration for signal() in looks as follows: > extern void (*signal(int, void (*) (int, ...)))(int, ...); >[gcc complains about:] > #include > void (*sigsave)(); You did not declare void (*sigsave)(int, ...); > sigsave = signal(SIGINT, SIG_IGN); > warning: argument passing between incompatible pointer types What is the definition of SIG_IGN in your machine's ? > signal(SIGINT, sigsave); > warning: assignment between incompatible pointer types Because your sigsave must point to a non-varargs function. >Is the header wrong, is gcc overly worried, or is my code wrong? Maybe (SIG_IGN?) , Maybe / Maybe not , AND yes >--Guido van Rossum, CWI, Amsterdam >"What do you *mean* it's not in the computer!" -- Madonna It's in the soft ware. -- Norman Diamond diamond@tkov50.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it.