RFC: Disable pointer signedness warnings
Jim Blandy
jimb@red-bean.com
Thu Jan 19 00:51:00 GMT 2006
Just to push the group a little further towards making a decision,
here's a patch:
gdb/ChangeLog:
2006-01-18 Jim Blandy <jimb@redhat.com>
* configure.ac: Add -Wno-pointer-sign to list of build warnings.
* configure: Regenerated.
gdb/doc/ChangeLog:
2006-01-18 Jim Blandy <jimb@redhat.com>
* gdbint.texinfo (Coding): Add entry for -Wno-pointer-sign to list
of warning flags.
Index: gdb/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.25
diff -c -p -r1.25 configure.ac
*** gdb/configure.ac 17 Dec 2005 22:33:59 -0000 1.25
--- gdb/configure.ac 18 Jan 2006 22:00:50 -0000
*************** AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
*** 1115,1121 ****
# gdb/doc/gdbint.texinfo.
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
! -Wunused-label -Wunused-function"
# GCC supports -Wuninitialized only with -O or -On, n != 0.
if test x${CFLAGS+set} = xset; then
--- 1115,1121 ----
# gdb/doc/gdbint.texinfo.
build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
! -Wunused-label -Wunused-function -Wno-pointer-sign"
# GCC supports -Wuninitialized only with -O or -On, n != 0.
if test x${CFLAGS+set} = xset; then
Index: gdb/doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.234
diff -c -p -r1.234 gdbint.texinfo
*** gdb/doc/gdbint.texinfo 4 Jan 2006 19:31:27 -0000 1.234
--- gdb/doc/gdbint.texinfo 18 Jan 2006 22:00:54 -0000
*************** switch (sched)
*** 5016,5021 ****
--- 5016,5030 ----
@end smallexample
@item -Wunused-function
+
+ @item -Wno-pointer-sign
+ In version 4.0, GCC began warning about pointer argument passing or
+ assignment even when the source and destination differed only in
+ signedness. However, most @value{GDBN} code doesn't distinguish
+ carefully between @code{char} and @code{unsigned char}. In early 2006
+ the @value{GDBN} developers decided correcting these warnings wasn't
+ worth the time it would take.
+
@end table
@emph{Pragmatics: Due to the way that @value{GDBN} is implemented most
More information about the Gdb-patches
mailing list