This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFH] Uninitialized warning as error is disabled on the trunk
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Apr 2008 00:18:30 -0700
- Subject: Re: [RFH] Uninitialized warning as error is disabled on the trunk
- References: <de8d50360803291444o247cbf05jf7c42ef8ca1f87f@mail.gmail.com>
This fixes a bug reported by Andrew Pinski on the gcc list.
> http://gcc.gnu.org/ml/gcc/2008-03/msg01058.html
There is a typo in system.h that prevents -Wuninitialized warnings from
being turned into an error when assert checking is enabled. I already
fixed the C++ front end bug that prevent Andrew from fixing this earlier.
This was tested with an x86-linux bootstrap and make check. There were
no regressions. I have checked it in.
This might expose bugs in other ports, but if so it shouldn't be too
hard to fix them.
Jim
2008-04-11 James E. Wilson <wilson@tuliptree.org>
* system.h: Change ASSERT_CHECKING to ENABLE_ASSERT_CHECKING.
Index: system.h
===================================================================
--- system.h (revision 134215)
+++ system.h (working copy)
@@ -802,7 +802,7 @@ extern void fancy_abort (const char *, i
#pragma GCC diagnostic warning "-Wcast-qual"
/* If asserts are disabled, activate -Wuninitialized as a warning (not
an error/-Werror). */
-#ifndef ASSERT_CHECKING
+#ifndef ENABLE_ASSERT_CHECKING
#pragma GCC diagnostic warning "-Wuninitialized"
#endif
#endif