This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix bootstrap with -O3
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Feb 2013 18:36:08 +0100
- Subject: [PATCH] Fix bootstrap with -O3
When bootstrapping with BOOT_FLAGS='-O3 -g', I get:
/home/polacek/src/gcc/gcc/c/c-parser.c: In function âc_expr c_parser_postfix_expression_after_primary(c_parser*, location_t, c_expr)â:
/home/polacek/src/gcc/gcc/c/c-parser.c:6908:16: error: âorigtypesâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
So this patch explicitly initializes origtypes to NULL.
Regtested/bootstrapped (with BOOT_FLAGS='-O3 -g') on x86_64-linux,
ok for trunk?
2013-02-07 Marek Polacek <polacek@redhat.com>
* c-parser.c (origtypes): Initialize to NULL.
--- gcc/c-parser.c.mp 2013-02-07 17:50:10.286742403 +0100
+++ gcc/c-parser.c 2013-02-07 17:50:23.331781876 +0100
@@ -6864,7 +6864,7 @@ c_parser_postfix_expression_after_primar
tree sizeof_arg[3];
unsigned int i;
vec<tree, va_gc> *exprlist;
- vec<tree, va_gc> *origtypes;
+ vec<tree, va_gc> *origtypes = NULL;
while (true)
{
location_t op_loc = c_parser_peek_token (parser)->location;
Marek