public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: egcs@cygnus.com, wilson@cygnus.com
Subject: Re: egcs-19980508 warning patches part 1/5
Date: Fri, 15 May 1998 01:48:00 -0000	[thread overview]
Message-ID: <10040.895212877@hurl.cygnus.com> (raw)
In-Reply-To: <199805141603.MAA25681@caip.rutgers.edu>

  In message < 199805141603.MAA25681@caip.rutgers.edu >you write:
  > 	I agree they are unlikely to point to an actual bug.  That's
  > why I try to eliminate them, so they don't distract you and others
  > from more serious warnings.
Yup.  Understood.  I've made the same argument myself :-)

  > 	Well if I'm the one investing the effort... :-)
Yup.  Thus the patches went in :-)

  > 	Seriously, I think I explained above why I see this as useful.
  > But I can understand your point of view and I'm not going to oppose if
  > you don't want these fixed.
As I said, I'm still undecided at this time.  And (of course) I'm
willing to keep going if that's what folks think is best.  I've
heard from both sides equally so far.

  > So maybe we should add:
  > 
  > 	-Wno-sign-compare
  > 	-Wno-unused
This kinda what I've been thinking about.  We can turn them on (particularly
-Wunused) at times to search for dead functions/parameters.

  > 	-Wno-uninitialized  (This one appears to be too broken to be useful.)
Yea.  I looked into improving this, but we need another fairly
significant concept to be added to the compiler.  I suspect we'll
have it one day, but not soon.

I actually did go fix a few of these.  But they're time consuming
since I actually did verify that the variable would be initialized
in each case before I put in a default initialization.

Even though these are the hardest warnings to fix properly, they
are probably the most important ones left to go after since they're
the most likely to expose a real (and bloody obscure) problem.

  > 	On the flip side, I think there are some other warnings (not
  > enabled by -W -Wall) that we should _add_ to WARN_CFLAGS.
I've considered this too.

Particularly aggregate-return (which isn't supported in some older
compilers, or has semantics which are rather unfriendly).

I've been nailed by shadowing problems in the past, so it's a
warning I like. :-)

  > 	BTW, what's a good value for LEN in -Wid-clash-LEN?
No clue.

  > 	-Wstrict-prototypes
  > 	-Wmissing-prototypes
  > 	-Wmissing-declarations
  > 	-Wredundant-decls
  > 
  > These might be useful to turn on once, fix the problems and turn it
  > off again since I think many spurious warnings would result.
There's certainly lots of warnings when you turn them on.  But
the prototype stuff is critical for fixing problems when HOST_WIDE_INT
is a different size than "int" or "long".

jeff

  parent reply	other threads:[~1998-05-15  1:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-14 11:50 Kaveh R. Ghazi
1998-05-14 21:48 ` Joern Rennecke
1998-05-15  1:48 ` Jeffrey A Law [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-05-16  6:53 Kaveh R. Ghazi
1998-05-13 16:02 Kaveh R. Ghazi
1998-05-13 20:23 ` Jeffrey A Law
1998-05-12 10:17 Kaveh R. Ghazi
1998-05-13  1:58 ` Jeffrey A Law

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=10040.895212877@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=ghazi@caip.rutgers.edu \
    --cc=wilson@cygnus.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).