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] silence uninitialised variable warnings




PaweÅ Sikora wrote:
Manuel LÃpez-IbÃÃez pisze:
On 11/09/2007, Brian Sidebotham <micros@valvers.com> wrote:
Hi Guys,

Attached is a patch to silence a lot of "var might be used uninitialised.."
warnings - Generally caused by a pointer to the var being passed to a function
that then modifies the contents of the var.



Do you get those warnings with a recent GCC version ?

4.2.2-20070825 produces these warnings. 4.3.0-20070825 works fine and Brian's patch isn't needed (at least for PR32395).

I am using gcc-4.0.3 (the current ubuntu gcc install version). However, are we saying that to get a warning-free build you must use an experimental version of gcc? The patch silences a good version of gcc whilst building gcc.


There are also a lot of "cast discards qualifiers from pointer target type" warnings too, which are next on my list. I am mainly wanting to get the number of warnings down for building arm-none-elf and arm-none-eabi.

I appreciate you don't need to support building current svn with gcc-2.95 or similar, but if the latest release version of gcc issues these warnings, then I think it is reasonable to silence them.

Best Regards,

Brian Sidebotham.


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