This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add gcc_assert



On 06/09/2004, at 8:22 AM, Nathan Sidwell wrote:


Geoffrey Keating wrote:
Could you implement --enable-checking=release as an interface to
switch on exactly those checks that are switched on in a release
branch?  That will save people having to read the documentation of
each release (there will be documentation, right?) to find out which
checking things are switched on in that release.
Like this?

built and manually tested by looking at the auto-* files on i686-pc-linux-gnu.

Yes, like that; except that it needs a documentation change somewhere, probably install.texi. OK with documentation.


nathan

--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk


2004-09-06 Nathan Sidwell <nathan@codesourcery.com>

	* configure.ac (enable-checking): Add release option. Reorganize
	to avoid repetition.
	* configure: Rebuilt.

Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.62
diff -c -3 -p -r2.62 configure.ac
*** configure.ac 4 Sep 2004 00:15:39 -0000 2.62
--- configure.ac 6 Sep 2004 15:20:20 -0000
*************** AC_ARG_ENABLE(checking,
*** 392,443 ****
[ --enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
! Categories are: none,assert,fold,gc,gcac,misc,
! rtlflag,rtl,tree,valgrind;
! default is assert,gc,misc,rtlflag,tree],
! [ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
! ac_assert_checking=
! case "${enableval}" in
! yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
! ac_rtlflag_checking=1 ; ac_assert_checking=1 ;;
! no) ;;
! *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
! set fnord $enableval; shift
! IFS="$ac_save_IFS"
! ac_assert_checking=1
! for check
! do
! case $check in
! assert) ac_assert_checking=1 ;;
! fold) ac_fold_checking=1 ;;
! gc) ac_gc_checking=1 ;;
! gcac) ac_gc_always_collect=1 ;;
! misc) ac_checking=1 ;;
! rtlflag) ac_rtlflag_checking=1 ;;
! rtl) ac_rtl_checking=1 ;;
! tree) ac_tree_checking=1 ;;
! valgrind) ac_checking_valgrind=1 ;;
! *) AC_MSG_ERROR(unknown check category $check) ;;
! esac
! done
! ;;
! esac
! ], [
! # Determine the default checks.
! if test x$is_release = x ; then
! # Enable some checks for development versions of GCC
! ac_assert_checking=1;
! ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
! else
! # Disable all but assertions for release versions of GCC.
! ac_assert_checking=1;
! fi])
nocommon_flag=""
if test x$ac_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1,
--- 392,444 ----
[ --enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
! Categories are: assert,fold,gc,gcac,misc,
! rtlflag,rtl,tree,valgrind,release,yes,all;],
! [ac_checking_flags="${enableval}"],[
! # Determine the default checks.
! if test x$is_release = x ; then
! ac_checking_flags=yes
! else
! ac_checking_flags=release
! fi])
! ac_assert_checking=1
! ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
! for check in $ac_checking_flags
! do
! case $check in
! yes) ac_assert_checking=1 ; ac_checking=1 ;
! ac_tree_checking=1 ; ac_gc_checking=1 ;
! ac_rtlflag_checking=1 ;;
! no) ac_assert_checking= ; ac_checking= ;
! ac_tree_checking= ; ac_rtl_checking= ;
! ac_rtlflag_checking= ; ac_gc_checking= ;
! ac_gc_always_collect= ; ac_fold_checking= ;;
! all) ac_assert_checking=1 ; ac_checking=1 ;
! ac_tree_checking=1 ; ac_rtl_checking=1 ;
! ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
! ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
! release) ac_assert_checking=1 ;;
! assert) ac_assert_checking=1 ;;
! fold) ac_fold_checking=1 ;;
! gc) ac_gc_checking=1 ;;
! gcac) ac_gc_always_collect=1 ;;
! misc) ac_checking=1 ;;
! rtlflag) ac_rtlflag_checking=1 ;;
! rtl) ac_rtl_checking=1 ;;
! tree) ac_tree_checking=1 ;;
! valgrind) ac_checking_valgrind=1 ;;
! *) AC_MSG_ERROR(unknown check category $check) ;;
! esac
! done
! IFS="$ac_save_IFS"
!
nocommon_flag=""
if test x$ac_checking != x ; then
AC_DEFINE(ENABLE_CHECKING, 1,
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure,v
retrieving revision 1.852
diff -c -3 -p -r1.852 configure
*** configure 4 Sep 2004 14:43:45 -0000 1.852
--- configure 6 Sep 2004 15:20:45 -0000
*************** Optional Features:
*** 867,875 ****
--enable-checking=LIST
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
! Categories are: none,assert,fold,gc,gcac,misc,
! rtlflag,rtl,tree,valgrind;
! default is assert,gc,misc,rtlflag,tree
--enable-mapped-location location_t is fileline integer cookie
--enable-coverage=LEVEL
enable compiler's code coverage collection.
--- 867,874 ----
--enable-checking=LIST
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
! Categories are: assert,fold,gc,gcac,misc,
! rtlflag,rtl,tree,valgrind,release,yes,all;
--enable-mapped-location location_t is fileline integer cookie
--enable-coverage=LEVEL
enable compiler's code coverage collection.
*************** fi
*** 3928,3981 ****
# Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then
enableval="$enable_checking"
! ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
! ac_assert_checking=
! case "${enableval}" in
! yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ;
! ac_rtlflag_checking=1 ; ac_assert_checking=1 ;;
! no) ;;
! *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
! set fnord $enableval; shift
! IFS="$ac_save_IFS"
! ac_assert_checking=1
! for check
! do
! case $check in
! assert) ac_assert_checking=1 ;;
! fold) ac_fold_checking=1 ;;
! gc) ac_gc_checking=1 ;;
! gcac) ac_gc_always_collect=1 ;;
! misc) ac_checking=1 ;;
! rtlflag) ac_rtlflag_checking=1 ;;
! rtl) ac_rtl_checking=1 ;;
! tree) ac_tree_checking=1 ;;
! valgrind) ac_checking_valgrind=1 ;;
! *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
echo "$as_me: error: unknown check category $check" >&2;}
{ (exit 1); exit 1; }; } ;;
! esac
! done
! ;;
! esac
!
! else


- # Determine the default checks.
- if test x$is_release = x ; then
- # Enable some checks for development versions of GCC
- ac_assert_checking=1;
- ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1;
- else
- # Disable all but assertions for release versions of GCC.
- ac_assert_checking=1;
- fi
- fi;
nocommon_flag=""
if test x$ac_checking != x ; then


--- 3927,3982 ----
# Check whether --enable-checking or --disable-checking was given.
if test "${enable_checking+set}" = set; then
enableval="$enable_checking"
! ac_checking_flags="${enableval}"
! else
!
! # Determine the default checks.
! if test x$is_release = x ; then
! ac_checking_flags=yes
! else
! ac_checking_flags=release
! fi
! fi;
! ac_assert_checking=1
! ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
! for check in $ac_checking_flags
! do
! case $check in
! yes) ac_assert_checking=1 ; ac_checking=1 ;
! ac_tree_checking=1 ; ac_gc_checking=1 ;
! ac_rtlflag_checking=1 ;;
! no) ac_assert_checking= ; ac_checking= ;
! ac_tree_checking= ; ac_rtl_checking= ;
! ac_rtlflag_checking= ; ac_gc_checking= ;
! ac_gc_always_collect= ; ac_fold_checking= ;;
! all) ac_assert_checking=1 ; ac_checking=1 ;
! ac_tree_checking=1 ; ac_rtl_checking=1 ;
! ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
! ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
! release) ac_assert_checking=1 ;;
! assert) ac_assert_checking=1 ;;
! fold) ac_fold_checking=1 ;;
! gc) ac_gc_checking=1 ;;
! gcac) ac_gc_always_collect=1 ;;
! misc) ac_checking=1 ;;
! rtlflag) ac_rtlflag_checking=1 ;;
! rtl) ac_rtl_checking=1 ;;
! tree) ac_tree_checking=1 ;;
! valgrind) ac_checking_valgrind=1 ;;
! *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
echo "$as_me: error: unknown check category $check" >&2;}
{ (exit 1); exit 1; }; } ;;
! esac
! done
! IFS="$ac_save_IFS"


  nocommon_flag=""
  if test x$ac_checking != x ; then

*************** if test "${gcc_cv_prog_makeinfo_modern+s
*** 5290,5296 ****
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
! echo "configure:5293: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
--- 5291,5297 ----
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
! echo "configure:5294: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]