Diego Novillo - Re: -Wuninitialized issues (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] |
- From: Diego Novillo
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org, Mark Mitchell
- Date: Tue, 1 Nov 2005 13:26:07 -0500
- Subject: Re: -Wuninitialized issues
- References: 4365CA5E.3070401@codesourcery.com <200511011106.49922.dnovillo@redhat.com> <1130869072.19967.232.camel@localhost.localdomain>
On Tuesday 01 November 2005 13:17, Jeffrey A Law wrote:
Possibly a useful thing to have, but I don't think we want to put the burden of detecting uninitialized variables onto each optimizer :-)
Heh. Indeed.
I think false positives are inevitable if we attempt to solve the problems Mark is complaining about. That's part of the reason why I think this needs to be switch controlled.
Agreed.
Your example is probably derived from C code which looks something like this:
Yeah, it's gcc.dg/m-un-1.c, IIRC.
Clearly the message could be better, but it's easy to see how this warning distinguishes itself from the "blah may be used uninitialized in this function" warning we give in other cases. We clearly state that it appeared to be used uninitialized, but optimizations changed that assessment.
Sounds good.
We won't get perfect answers, which is fine given the nature of the problem. However, I would like, to get consistent answers. If we decide to re-organize the optimization pipeline, we should not be getting different -Wuninitialized behaviour. Perhaps that's an easier problem to solve. For instance, for GCC bootstraps we could ignore the warning when it's from "... but was later optimized away ...".
- Follow-Ups:
- Re: -Wuninitialized issues
* From: Jeffrey A Law - Re: -Wuninitialized issues
* From: Mark Mitchell - Re: -Wuninitialized issues
* From: Jeffrey A Law
- Re: -Wuninitialized issues
- References:
- Re: -Wuninitialized issues
* From: Diego Novillo - Re: -Wuninitialized issues
* From: Jeffrey A Law
- Re: -Wuninitialized issues
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |