public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/42884] GCC (v4.3.3) fails to detect uninitialized variable
Date: Fri, 03 Sep 2010 14:07:00 -0000	[thread overview]
Message-ID: <20100903140633.32325.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42884-18720@http.gcc.gnu.org/bugzilla/>



------- Comment #22 from manu at gcc dot gnu dot org  2010-09-03 14:06 -------
(In reply to comment #21)
> (In reply to comment #8)
> > Is 'coverity' a compiler? I don't think so.
> > 
> 
> Coverity is not a tool that generates code, but it does perform
> all the syntactic & semantic analysis that a code-generating compiler will.
> Then, it goes beyond that with further static analysis.

GCC is not designed to be used as a static analysis tool. This doesn't mean it
wouldn't be interesting to be able to reuse GCC analysis modules for doing
that. Other compilers have shown that it is possible and a desirable feature
[*]. However, GCC is not designed to be reusable, there is none working on a
similar thing for GCC, and no sign that any existing GCC developer will start
working on it in the near future. Unless someone new starts working on this,
don't expect anything similar from GCC.

[*] http://clang-analyzer.llvm.org/

> > Do you have actual examples of
> > *compilers* which, everything taken into account, decided to make sure this
> > case is worth warning?
> 
> That's the worst argument I've read in a long time.
> Do we need proof that another compiler does something before the gcc 
> team will take it up now?

There is more work to do in GCC than people willing (or being paid) to do it,
so if there is some indication that some feature may be impossible or too
expensive to implement, existing GCC developers will probably focus their
efforts on something else more feasible. If you can show that another compiler
is able to do it in an efficient way, that shows that it is feasible. As far as
I know, GCC has always been a very conservative compiler in terms of features,
not a source of innovation. So yes, showing a working implementation seems to
be a necessary condition (but not a sufficient one).

In fact, it is common practice to check what other compilers do in order to
verify a bug, and it is useful information in bug reports.

I am sorry for this flamewar. I hope I clarified all the issues and the wiki
[**] contains a more detailed discussion about the technical issues related to
uninitialized warnings in case anyone is willing to help to solve them.

[**] http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42884


      parent reply	other threads:[~2010-09-03 14:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 13:58 [Bug c/42884] New: " tstdenis at elliptictech dot com
2010-01-27 14:01 ` [Bug c/42884] " paolo dot carlini at oracle dot com
2010-01-27 14:01 ` tstdenis at elliptictech dot com
2010-01-27 14:01 ` paolo dot carlini at oracle dot com
2010-01-27 14:03 ` tstdenis at elliptictech dot com
2010-01-27 14:07 ` paolo dot carlini at oracle dot com
2010-01-27 14:07 ` paolo dot carlini at oracle dot com
2010-01-27 14:09 ` tstdenis at elliptictech dot com
2010-01-27 14:13 ` paolo dot carlini at oracle dot com
2010-01-27 14:28 ` tstdenis at elliptictech dot com
2010-01-27 14:37 ` paolo dot carlini at oracle dot com
2010-01-27 15:43 ` tstdenis at elliptictech dot com
2010-01-27 15:47 ` paolo dot carlini at oracle dot com
2010-01-27 15:58 ` tstdenis at elliptictech dot com
2010-01-27 15:59 ` paolo dot carlini at oracle dot com
2010-01-27 16:05 ` tstdenis at elliptictech dot com
2010-01-27 16:06 ` rguenth at gcc dot gnu dot org
2010-01-27 16:22 ` tstdenis at elliptictech dot com
2010-01-27 16:23 ` paolo dot carlini at oracle dot com
2010-01-27 16:51 ` rguenth at gcc dot gnu dot org
2010-01-27 17:55 ` tstdenis at elliptictech dot com
2010-01-27 19:51 ` rguenth at gcc dot gnu dot org
2010-09-02 16:01 ` tadhunt at gmail dot com
2010-09-02 23:11 ` manu at gcc dot gnu dot org
2010-09-03 13:08 ` thutt at vmware dot com
2010-09-03 14:07 ` manu at gcc dot gnu dot org [this message]

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=20100903140633.32325.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).