This is the mail archive of the gcc@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: Dubious "'foo' might be used uninitialized in this function"message


Dmitry Antipov wrote:

w.c: In function `f':
w.c:5: warning: 'z' might be used uninitialized in this function

which is not true.
'tis true too, just here.
   return x + y + z;

read the documentation for -Wuninitialized, which will explain
why it can't get all the cases correct.

Is it reasonable to learn GCC do more analysis in attempt to avoid
warning in this case ? How is it complex ?

it gets as complex as the halting problem :)


nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


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