(C++) patch to tinfo2.cc

Jason Merrill jason@cygnus.com
Sat Jun 10 14:08:00 GMT 2000


We don't have stdlib.h on a freestanding platform, but we already
require abort, so just declare it.

2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>

	* tinfo2.cc: Just declare abort.

Index: tinfo2.cc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/tinfo2.cc,v
retrieving revision 1.25
diff -c -p -r1.25 tinfo2.cc
*** tinfo2.cc	2000/05/30 15:44:20	1.25
--- tinfo2.cc	2000/06/09 16:02:59
***************
*** 28,36 ****
  // the GNU General Public License.
  
  #include <stddef.h>
- #include <stdlib.h>		// for abort
  #include "tinfo.h"
  #include "new"			// for placement new
  
  using std::type_info;
  
--- 28,38 ----
  // the GNU General Public License.
  
  #include <stddef.h>
  #include "tinfo.h"
  #include "new"			// for placement new
+ 
+ // We can't rely on having stdlib.h if we're freestanding.
+ extern "C" void abort ();
  
  using std::type_info;
  


More information about the Gcc-patches mailing list