This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa/rfc] Add --enable-gdb-build-warnings, update doco
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [rfa/rfc] Add --enable-gdb-build-warnings, update doco
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 20 Nov 2000 22:47:25 +1100
Hello,
The --enable-gdb-build-warnings configuration option permits finer
grained (gdb directory only) control over the build warnings list.
Useful when building with -Werror.
Eli,
Note the doco change. Ok?
Andrew
Index: ChangeLog
Mon Nov 20 13:59:29 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in: Add support for configure option
--enable-gdb-build-warnings. Mention need to update doco.
* configure: Regenerate.
Index: doc/ChangeLog
Mon Nov 20 21:29:35 2000 Andrew Cagney <cagney@b1.cygnus.com>
* gdbint.texinfo (Coding): Update current value of
--enable-build-warnings. Mention --enable-gdb-build-warnings.
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.15
diff -p -r1.15 gdbint.texinfo
*** gdbint.texinfo 2000/08/10 13:42:29 1.15
--- gdbint.texinfo 2000/11/20 11:10:36
*************** does not require it, @value{GDBN} requir
*** 2773,2783 ****
@value{GDBN} follows an additional set of coding standards specific to @value{GDBN},
as described in the following sections.
! You can configure with @samp{--enable-build-warnings} to get GCC to
! check on a number of these rules. @value{GDBN} sources ought not to engender any
! complaints, unless they are caused by bogus host systems. (The exact
! set of enabled warnings is currently @samp{-Wall -Wpointer-arith
! -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations}.
@subsection Formatting
--- 2773,2784 ----
@value{GDBN} follows an additional set of coding standards specific to @value{GDBN},
as described in the following sections.
! You can configure with @samp{--enable-build-warnings} or
! @samp{--enable-gdb-build-warnings} to get GCC to check on a number of
! these rules. @value{GDBN} sources ought not to engender any complaints,
! unless they are caused by bogus host systems. (The exact set of enabled
! warnings is currently @samp{-Wimplicit -Wreturn-type -Wcomment
! -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized}.
@subsection Formatting
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.44
diff -p -r1.44 configure.in
*** configure.in 2000/09/11 17:57:07 1.44
--- configure.in 2000/11/20 10:54:10
*************** if test "${enable_netrom}" = "yes"; then
*** 531,538 ****
fi
! # Don't add -Wall or -Wunused, they include -Wunused-parameter which
! # causes noise.
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
--- 531,540 ----
fi
! # NOTE: Don't add -Wall or -Wunused, they both include
! # -Wunused-parameter which reports bogus warnings.
! # NOTE: If you add to this list, remember to update
! # gdb/doc/gdbint.texinfo.
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
*************** AC_ARG_ENABLE(build-warnings,
*** 554,559 ****
--- 556,575 ----
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting compiler warning flags = $build_warnings" 6>&1
+ fi])dnl
+ AC_ARG_ENABLE(gdb-build-warnings,
+ [ --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used],
+ [case "${enableval}" in
+ yes) ;;
+ no) build_warnings="-w";;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${build_warnings} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ build_warnings="${t} ${build_warnings}";;
+ *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ esac
+ if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+ echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
WERROR_CFLAGS=""