This is the mail archive of the gcc-help@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: Missing warning about uninitialized variable.


2007/11/29, John Love-Jensen <eljay@adobe.com>:
> Hi J.C.,
>
> Just out of curiosity, what does the 4.2.3 compiler say (if anything) if the
> uninitialized warning is enabled?
>
> $ gcc -O -Wall -o foo foo.c
>
> Thanks,
> --Eljay
>
>

With -O, -O1, -O2, -O3, they print 5 times of value 3
Without optimization, it prints stochasticly random data.

For large projects with uninitialized variables, the behaviour
could be stochasticly flawed as a russian roulette.

  J.C.Pizarro


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