Message ID | 20130207173607.GL7360@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, 7 Feb 2013, Marek Polacek wrote: > 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. Maybe mention PR44938? (there may be a dup or two) (I thought it was the name of the function that went inside the parentheses in a ChangeLog entry)
--- 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;