This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix uninitialized pp->flags
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Mar 2013 22:08:35 +0100
- Subject: [PATCH] Fix uninitialized pp->flags
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This is something that caused a lot of testsuite failures during my
--enable-checking=yes,valgrind bootstrap. Nothing was initializing
pp->flags. Fixed thusly, bootstrapped/regtested on x86_64-linux and
i686-linux, ok for trunk?
2013-03-04 Jakub Jelinek <jakub@redhat.com>
* c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
--- gcc/c-family/c-pretty-print.c.jj 2013-02-13 17:05:53.000000000 +0100
+++ gcc/c-family/c-pretty-print.c 2013-03-04 16:34:00.989736325 +0100
@@ -2311,6 +2311,8 @@ pp_c_pretty_printer_init (c_pretty_print
{
pp->offset_list = 0;
+ pp->flags = 0;
+
pp->declaration = pp_c_declaration;
pp->declaration_specifiers = pp_c_declaration_specifiers;
pp->declarator = pp_c_declarator;
Jakub