https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 40377
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40377&action=edit
gcc7-pr77767.patch
I went through all the grokdeclarator (indirect) callers, and those callers (of
e.g. groktypename, grokparm, push_parm_decl and c_parser_objc_method_decl) that
are called with non-NULL expr actually ensure it is initialized with NULL_TREE
first and want to append to it.
Here is thus an untested patch. Optionally, the building of COMPOUND_EXPR
could be in both spots (this one and the one in the if (this_size_varies)
handling later on) replaced with append_to_statement_list (whatever, expr);
Any preferences here?