🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.groff.bug
Article #63

indxbib.cc compiled under gcc 2.2

#63
From: John W. Pope
Date: Tue, 15 Sep 1992 05:15
21 lines
1417 bytes
I had to force the following casts upon the "fatal_signal()" function
to avoid having gcc optimize the pointers to an "auto" storage class...

  signal(SIGHUP, (void (*)(int,...))fatal_signal);
  signal(SIGINT, (void (*)(int,...))fatal_signal);
  signal(SIGTERM, (void (*)(int,...))fatal_signal);

./indxbib/indxbib.cc circa line 219

the error messages were:
indxbib.cc:218: incompatible pointer types for argument 1 of `void (* signal (int, auto void (*)(int ...)))(int ...)'
indxbib.cc:219: incompatible pointer types for argument 1 of `void (* signal (int, auto void (*)(int ...)))(int ...)'
indxbib.cc:220: incompatible pointer types for argument 1 of `void (* signal (int, auto void (*)(int ...)))(int ...)'


It makes sense that the signal handler CAN'T be passed an auto pointer... who knows what
will be put there after leaving the function...

JP
(need more info?  email me jwpope@uswest.com)
kudo's to jjc
Technical Details
Message-ID: <199209151715.AA13053@lookout.it.uswc.uswest.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lookout.IT.USwc.USwest.COM!jwpope

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!hri.com!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lookout.IT.USwc.USwest.COM!jwpope
From: jwpope@lookout.IT.USwc.USwest.COM (John W. Pope)
Newsgroups: gnu.groff.bug
Subject: indxbib.cc compiled under gcc 2.2
Message-ID: <199209151715.AA13053@lookout.it.uswc.uswest.com>
Date: 15 Sep 92 05:15:57 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 21
Approved: bug-groff@prep.ai.mit.edu