This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [PATCH] avoid uninit value warnings in dead code


Hi,

I think you missed my project proposal
http://gcc.gnu.org/ml/gcc/2007-03/msg00637.html

Nonetheless, your patch is interesting and I will follow closely any
follow up patches. I don't want to discourage you. I am not sure yet
how far I will get with this.

(I am not following the list closely because almost all computers I
have access to, including my own laptop that is the only computer I
own, are currently broken I am having a very very hard week, you have
no idea...)

Cheers,

Manuel.



On 12/04/07, Dirk Mueller <dmueller@suse.de> wrote:
On Wednesday, 11. April 2007, Andrew Pinski wrote:

> Actually the example Dirk gave is not a false postive "is used
> uninitialized"

It is. the variable is not used uninitialized. never. the compiler should
realize that and not warn about something that is not true. Don't make
useful
warnings useless by not fixing known false positives.

> In fact this was the same behavior 3.4 and before also
> gave.

Ah, so because a stone age version of gcc was wrong we have to preserve that
behaviour? Makes no sense to me.

> Let me find the old email about adding uninitialized variable
> warning to the tree level.  It talks about this from what I remember,
> basicially the warning is correct and actually gives us back to old
> behavior.  Again I rather see more true postives to show up than false
> postives to disappear.

I have troubles understanding what you intend to say. If you're trying to
say
that in the testcase I added it should warn about "may be used" then I'm
fine
with that. but it is not a case of "is used" uninitialized.

I can try craft a followup patch for the "maybe used uninitialized"
behaviour
if thats the consensus.


Dirk




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]