public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Add -Werror to build_warnings
@ 2005-02-18  6:33 Paul Schlie
  2005-02-18 14:34 ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Schlie @ 2005-02-18  6:33 UTC (permalink / raw)
  To: Alan Modra; +Cc: Ben Elliston, binutils, Nick Clifton

(sorry, wrong subject in earlier message got a way from me)

> Alan Modra <amodra at bigpond dot net dot au>
> I think we could enable -Werror once someone approves my cgen patch.
> About all we're left with is a zillion gcc-4.0 warnings about
> "pointer targets ... differ in signedness".  So if Ben can figure out
> how to add -Wno-pointer-sign for compilers that support it, then -Werror
> should soon smoke out the last few compile warnings.

- and/or recommend that GCC-4.0 eliminate that frivolous warning by default.



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Add -Werror to build_warnings
@ 2005-02-18 15:58 Paul Schlie
  2005-02-18 16:05 ` Zack Weinberg
  2005-02-18 16:23 ` Alan Modra
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Schlie @ 2005-02-18 15:58 UTC (permalink / raw)
  To: Alan Modra; +Cc: Ben Elliston, binutils, Nick Clifton

> From: Alan Modra <amodra@bigpond.net.au>
>> - and/or recommend that GCC-4.0 eliminate that frivolous warning by default.
> I'm not going to do any such thing.  I rather like the fact that gcc-4.0
> has more warnings, despite it causing some work to make our code warning
> free.  Case in point: Better analysis of uninitialized variables found
> two places in binutils where we really could use an uninitialized
> variable in corner cases.  It also warned about 4 or 5 other places that
> were not real problems.  That's a very good ratio.  I'll take 100 false
> positives if a compiler finds me one real error..

- Fully understand your position in general, however honestly question the
  utility of the specific warning: of a comparison between two pointers to
  otherwise equivalent rank data types which only in sign-ness; as it's not
  clear that such a comparison could ever lead to unintended consequences,
  as even arguably evidenced by the apparent intent to disable it, rather
  than be alerted of such comparisons by default (presumably as it's not
  perceived as likely helpful)?  However would very much appreciate an
  example to the contrary, as I'm obviously confused by it's purpose, as
  the sign-ness of a data type seems irrelevant when attempting to compare
  the addresses two otherwise compatible data types?

  (but not a big deal, as the warning may easily be disabled as desired)


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Add -Werror to build_warnings
@ 2005-02-16  5:01 Ben Elliston
  2005-02-16  6:30 ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: Ben Elliston @ 2005-02-16  5:01 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

Now that Nick has finished off the last of the cleanups (hooray!), now
is likely the time to add -Werror to the build_warnings variable in
the various configure.ins.  These flags are only used when the user
explicitly passes --enable-build-warnings, so we can do this now that
we build cleanly with GCC with minimal disruption.

Okay for mainline?

bfd,binutils,gas,gprof,ld,opcodes/ChangeLog:

2005-02-16  Ben Elliston  <bje@au.ibm.com>

	* configure.in (build_warnings): Add -Werror.
	* configure: Rebuild.

The diffs for {bfd,binutils,gas,gprof,ld,opcodes}/configure.in are all
the same, so I'll paste in just one:

Index: configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.166
diff -u -p -c -r1.166 configure.in
*** configure.in	6 Jan 2005 16:18:20 -0000	1.166
--- configure.in	16 Feb 2005 00:14:02 -0000
*************** AC_ARG_WITH(mmap,
*** 51,57 ****
    *)    AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
  esac],[want_mmap=false])dnl
  
! build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
  AC_ARG_ENABLE(build-warnings,
  [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
  [case "${enableval}" in
--- 51,57 ----
    *)    AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
  esac],[want_mmap=false])dnl
  
! build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror"
  AC_ARG_ENABLE(build-warnings,
  [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
  [case "${enableval}" in

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-02-18  6:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18  6:33 Add -Werror to build_warnings Paul Schlie
2005-02-18 14:34 ` Alan Modra
  -- strict thread matches above, loose matches on Subject: below --
2005-02-18 15:58 Paul Schlie
2005-02-18 16:05 ` Zack Weinberg
2005-02-18 16:08   ` Paul Schlie
2005-02-18 16:23 ` Alan Modra
2005-02-16  5:01 Ben Elliston
2005-02-16  6:30 ` Alan Modra
2005-02-16  7:27   ` Ben Elliston
2005-02-16 13:01     ` Nick Clifton
2005-02-18  2:56   ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).