Patch to use --enable-checking=misc,tree,gc by default

Andreas Jaeger aj@suse.de
Wed May 17 01:34:00 GMT 2000


At various times their was a discussion to enable checking by
default.    I'd like to quote Richard Henderson and Franz Sirl
(Message ID < 4.3.1.2.20000511115639.0523dce0@mail.lauterbach.com > with
subject "Re: patch for flow.c: flow_delete_insn" on gcc-patches):

Franz> At 19:45 10.05.00, Richard Henderson wrote:
Franz> >On Wed, May 10, 2000 at 12:01:35PM +0200, Franz Sirl wrote:
Franz> > > /home/fsirl/cvsx/gccm/gcc/cppinit.c:323: number of bb notes in insn chain
Franz> > > (8) != n_basic_blocks (7)
Franz> >
Franz> >Yes, it's amazing the things enable checking finds.  Why I
Franz> >don't just leave it on, I don't know.  Probably I just forget
Franz> >to consistently add the thing to the configure line...
Franz> 
Franz> Well, time for my repeat-every-few-months statement :-)):
Franz> 
Franz> Enable --enable-checking=tree,gc,misc by default in CVS and only disable it 
Franz> on release branches, just like we handle the WARN_CFLAGS. I did some some 
Franz> measurements a while ago, the bootstrap/check time only increases a few 
Franz> percent and is worth it IMHO.

Here's a patch to do so.  This should help to catch more errors
earlier on.

Following Franz' suggestion, I've used tree,gc and misc for checking
and changed --enable-checking=yes to do the same.

I checked that the patch does the right thing and I'm currently
bootstrapping on i686-linux with this.

Is this ok to commit (even if it doesn't bootstrap?) ?

Andreas

2000-05-17  Andreas Jaeger  <aj@suse.de>

	* configure.in: Use --enable-checking=misc,tree,gc by default if
	no --enable-checking option is given and for
	--enable-checking=yes.

Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/configure.in,v
retrieving revision 1.369
diff -u -u -r1.369 configure.in
--- configure.in	2000/05/11 07:20:21	1.369
+++ configure.in	2000/05/17 08:24:21
@@ -189,7 +189,7 @@
 ac_gc_checking=
 ac_gc_always_collect=
 case "${enableval}" in
-yes)	ac_checking=1 ; ac_tree_checking=1 ; ac_rtl_checking=1 ;;
+yes)	ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;;
 no)	;;
 *)	IFS="${IFS= 	}"; ac_save_IFS="$IFS" IFS="$IFS,"
 	set fnord $enableval; shift
@@ -207,6 +207,9 @@
 	done
 	;;
 esac
+], 
+# Enable some checks by default for development versions of GCC
+[ac_checking=1; ac_tree_checking=1; ac_gc_checking=1;])
 if test x$ac_checking != x ; then
   AC_DEFINE(ENABLE_CHECKING, 1,
 [Define if you want more run-time sanity checks.  This one gets a grab
@@ -235,7 +238,7 @@
    paranoid mode, validating the entire heap and collecting garbage at
    every opportunity.  This is extremely expensive.])
 fi
-])
+
 
 AC_ARG_ENABLE(cpp,
 [  --disable-cpp           don't provide a user-visible C preprocessor.],

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de



More information about the Gcc-patches mailing list