>>>> "SJT" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes: 
>>>> "Stephen" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes: 
Stephen> Dunno; does this tell you
anything?
SJT> Sorry, it was late (it's later now...).  I can read `info gcc', really
SJT> I can....
SJT> -Wsign-compare
SJT> Martin: the data destruction _was_ your bug (identified as yours by
SJT> lack of a ChangeLog, and being in the same CVS diff as a Martin
SJT> mega-patch that was in the ChangeLog, 1998-03-22, eliminate MAC_*
SJT> macros).  That is the only one in lstream.c, though.
SJT> Matt: regex.c is chock full of warnings.  font-lock.c, search.c, and
SJT> symbol.c have a few too.  syntax.c has none, though.  I don't know if
SJT> any of those functions use a "negative value is end of loop"
SJT> convention, but that would explain inflooping on selected platforms if
SJT> they're there.
SJT> **** ObPatch (not on -patches because I don't know if this is the
SJT> **** right way to munge configure.in):
I don't want -Wsign-compare in the default CFLAGS.  Too many warnings,
and too annoying to fix.
I don't really want to get warnings for this code:
void foo (unsigned int s) {
  int i;
  for (i = 0; i <= s; i++) ...
}
Of course, it's valuable to use -Wsign-compare to audit existing
problems such as ssize_t, etc.  I myself have fixed many many
-Wsign-compare warnings.
If you really really want to add this warning flag, you better fix all
the warnings first; else folks will start to ignore other warnings.
SJT> Index: configure.in
SJT> ===================================================================
SJT> RCS file: /usr/CVSroot/XEmacs/xemacs/configure.in,v
SJT> retrieving revision 1.111.2.147
SJT> diff -u -r1.111.2.147 configure.in
SJT> --- configure.in        2001/02/13 06:34:39     1.111.2.147
SJT> +++ configure.in        2001/02/15 15:15:11
SJT> @@ -1879,6 +1879,10 @@
SJT>    dnl Should we take debugging options into consideration?
SJT>    if   test "$GCC" = "yes"; then
SJT>      CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes
-Wshadow"
SJT> +    dnl gcc 2.95.3 seems to have changed size_t to unsigned, screwing up
SJT> +    dnl comparisons between buffer offsets and bytes written values (which
SJT> +    dnl are often negative to indicate failure)
SJT> +    CFLAGS="$CFLAGS -Wsign-compare"
SJT>      dnl glibc is intentionally not `-Wpointer-arith'-clean.
SJT>      dnl Ulrich Drepper has rejected patches to fix the glibc header files.
SJT>      test "$have_glibc" != "yes" &&
CFLAGS="$CFLAGS -Wpointer-arith"