🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #2192

"on_exit" bug?

#2192
From: Dave Newton
Date: Mon, 12 Feb 1990 20:45
55 lines
2635 bytes

Micheal,

The following code runs correctly "g++-1.36.1" but not on "g++-1.36.4".
The exit handler "test" does not seem to be invoked for "g++-1.36.4".
If this is difficult to fix a work around would be nice for the time
being.


#include <stream.h>

typedef void (*VFPI)();
typedef	char*	caddr_t;
extern "C" int on_exit(VFPI, caddr_t);

void test() {
  cout << "exiting " << "\n";
}

main() {
  on_exit(test, 0);
  exit(0);
}




[1.54]suntrek) g++-1.36.1 -v -g -o exiton exiton.cc
gcc version 1.36.1 (based on GCC 1.36)
 /usr/local/gnu/1.36/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 exiton.cc /usr/tmp/cca04583.cpp
GNU CPP version 1.36
 /usr/local/gnu/1.36/lib/gcc-cc1plus /usr/tmp/cca04583.cpp -quiet -dumpbase exiton.cc -g -version -o /usr/tmp/cca04583.s
GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
 /usr/local/gnu/1.36/lib/gcc-as -mc68020 -o exiton.o /usr/tmp/cca04583.s
 /usr/local/gnu/1.36/lib/gcc-ld -o exiton -e start -dc -dp -Bstatic /lib/crt0.o /lib/Mcrt1.o exiton.o -lg++ /usr/local/gnu/1.36/lib/gcc-gnulib -lg -lc

[1.55]suntrek) exiton
exiting 



[1.56]suntrek) g++-1.36.4 -v -g -o exiton exiton.cc
g++ version 1.36.4 (based on GCC 1.36.93)
 /usr/local/gnu/1.36.4/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 exiton.cc /usr/tmp/cca04589.cpp
GNU CPP version 1.36.92
 /usr/local/gnu/1.36.4/lib/gcc-cc1plus /usr/tmp/cca04589.cpp -quiet -dumpbase exiton.cc -g -version -o /usr/tmp/cca04589.s
GNU C++ version 1.36.4 (based on GCC 1.36.93) (68k, MIT syntax) compiled by GNU C version 1.36.92.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
 /usr/local/gnu/1.36.4/lib/gcc-as -mc68020 -o exiton.o /usr/tmp/cca04589.s
 /usr/local/gnu/1.36.4/lib/gcc-ld -o exiton -e start -dc -dp -Bstatic /lib/crt0.o /lib/Mcrt1.o exiton.o -lg++ /usr/local/gnu/1.36.4/lib/gcc-gnulib -lg -lc -lg -L/usr/lib/f68881

[1.57]suntrek) exiton
[1.58]suntrek) 
Technical Details
Message-ID: <9002122045.AA04595@suntrek.cad.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!newton%cadillac.cad.mcc.com

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!newton%cadillac.cad.mcc.com
From: newton%cadillac.cad.mcc.com@MCC.COM (Dave Newton)
Newsgroups: gnu.g++.bug
Subject: "on_exit" bug?
Message-ID: <9002122045.AA04595@suntrek.cad.mcc.com>
Date: 12 Feb 90 20:45:21 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 55