[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread pinskia at earth dot geop dot uc dot edu
--- Comment #9 from pinskia at earth dot geop dot uc dot edu 2006-10-23 21:52 --- Subject: Re: Gcc gives invalid warning about unitialized variable > > > > --- Comment #8 from mbligh at mbligh dot org 2006-10-23 21:50 --- > > Initialize the variable and forget about ineffi

Re: [Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread Andrew Pinski
> > > > --- Comment #8 from mbligh at mbligh dot org 2006-10-23 21:50 --- > > Initialize the variable and forget about inefficiency. Again this is fixed > > for > > 4.2.0, the warning is only because __builtin_expect gets in the way of > > figuring > > out if the variable is used uni

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread mbligh at mbligh dot org
--- Comment #8 from mbligh at mbligh dot org 2006-10-23 21:50 --- > Initialize the variable and forget about inefficiency. Again this is fixed > for > 4.2.0, the warning is only because __builtin_expect gets in the way of > figuring > out if the variable is used uninitialized, nothing

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2006-10-23 21:45 --- (In reply to comment #6) > Re the non-inlined functions ... > Have been discussing this with Andrew Morton. > > what do we do then? Adding dead code to fix the fact that gcc can't see into > other functions is incor

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread mbligh at mbligh dot org
--- Comment #6 from mbligh at mbligh dot org 2006-10-23 21:42 --- Re the non-inlined functions ... Have been discussing this with Andrew Morton. what do we do then? Adding dead code to fix the fact that gcc can't see into other functions is incorrect and inefficient. Having lots of com

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-10-23 21:30 --- (In reply to comment #4) > And indeed, if I remove that unlikely(), it does work. > > There's another set of these where the called initializer is not inlined, > ie: > > int x; > initializer(&x); If initializer is

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread mbligh at mbligh dot org
--- Comment #4 from mbligh at mbligh dot org 2006-10-23 21:19 --- And indeed, if I remove that unlikely(), it does work. There's another set of these where the called initializer is not inlined, ie: int x; initializer(&x); Which it seems totally blind to, even if the initializer does

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread mbligh at mbligh dot org
--- Comment #3 from mbligh at mbligh dot org 2006-10-23 21:08 --- Yeah, is builtin_expect ;-( #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29574

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-10-23 20:59 --- If it is defined using __builtin_expect, then this is most likely PR 21513 which was fixed for 4.2.0, it is hard to fix correctly for 4.1.0 and 4.0.0 without removing all of loop.c. Can you attach the preprocessed s

[Bug middle-end/29574] Gcc gives invalid warning about unitialized variable

2006-10-23 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-23 20:57 --- How is unlikely defined? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29574