Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: Use -Wall -Wextra
Date: Sat, 30 Dec 2006 15:32:00 -0000	[thread overview]
Message-ID: <uhcvd2yd1.fsf@gnu.org> (raw)
In-Reply-To: <20061229210206.GA23681@nevyn.them.org> (message from Daniel 	Jacobowitz on Fri, 29 Dec 2006 16:02:06 -0500)

> Date: Fri, 29 Dec 2006 16:02:06 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sourceware.org
> 
> How about -Wall without -Wextra then?

Fine with me.

> I think neither of us is actually talking about -Walways-true.

Maybe.  I was talking about this one (happens with yesterday's
snapshot):

    gcc -c -DHAVE_CONFIG_H    -I. -I.././readline -DRL_LIBRARY_VERSION='"5.1"' -g -O2 bind.c
    bind.c: In function 'rl_function_of_keyseq':
    bind.c:682: warning: comparison is always true due to limited range of data type
    rm -f display.o
    gcc -c -DHAVE_CONFIG_H    -I. -I.././readline -DRL_LIBRARY_VERSION='"5.1"' -g -O2 display.c
    display.c: In function 'rl_character_len':
    display.c:1844: warning: comparison is always true due to limited range of data type

It looks like this happens even without -Wall.  What a screwup!

> >     gcc -c -g -O2    -I. -I. -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include   -DMI_OUT=1 -DTUI=1  -Wall -Wextra -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused-parameter -Wno-unused -Wno-sign-compare -Wno-switch -Wno-missing-field-initializers -Werror infrun.c
> >     cc1: warnings being treated as errors
> >     infrun.c: In function 'handle_inferior_event':
> >     infrun.c:1458: warning: statement with no effect
> >     make[2]: *** [infrun.o] Error 1
> 
> Thanks.  That comes from the default definition of a macro which no
> longer has any non-default definitions; we may as well garbage collect
> it.  I don't know why I didn't get the warning; I can provoke it for
> a small testcase.
> 
> I'll remove the macro, since that's an unrelated cleanup.

I'll wait for the patch, thanks.


  reply	other threads:[~2006-12-30 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-28 19:55 Daniel Jacobowitz
2006-12-29 12:13 ` Eli Zaretskii
2006-12-29 13:58   ` Daniel Jacobowitz
2006-12-29 20:44     ` Eli Zaretskii
2006-12-29 21:02       ` Daniel Jacobowitz
2006-12-30 15:32         ` Eli Zaretskii [this message]
2006-12-30 16:00           ` Daniel Jacobowitz
2006-12-30 16:55             ` Eli Zaretskii
2007-01-03 19:12             ` Daniel Jacobowitz
2007-01-03 20:38               ` Mark Kettenis
2007-01-04  4:09               ` Eli Zaretskii
2007-01-04 19:42               ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uhcvd2yd1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox