Re: C PATCH to fix c/79758 (ICE-on-invalid with function redefinition and old style decls)

2017-03-03 Thread Bernd Schmidt
On 03/03/2017 02:33 PM, Marek Polacek wrote: 2017-03-03 Marek Polacek PR c/79758 * c-decl.c (store_parm_decls_oldstyle): Check if the element of current_function_prototype_arg_types is error_mark_node. Fix formatting. Use TREE_VALUE

Re: C PATCH to fix c/79758 (ICE-on-invalid with function redefinition and old style decls)

2017-03-03 Thread Marek Polacek
On Thu, Mar 02, 2017 at 08:47:57PM +0100, Bernd Schmidt wrote: > On 03/02/2017 06:35 PM, Marek Polacek wrote: > > While at it, I fixed wrong formatting in the nearby code. Also use > > NULL_TREE > > instead of 0 where appropriate. I really dislike those zeros-as-trees; one > > day I'll just go

Re: C PATCH to fix c/79758 (ICE-on-invalid with function redefinition and old style decls)

2017-03-02 Thread Bernd Schmidt
On 03/02/2017 06:35 PM, Marek Polacek wrote: While at it, I fixed wrong formatting in the nearby code. Also use NULL_TREE instead of 0 where appropriate. I really dislike those zeros-as-trees; one day I'll just go and turn them into NULL_TREEs. I sympathize, but it makes it harder to see

C PATCH to fix c/79758 (ICE-on-invalid with function redefinition and old style decls)

2017-03-02 Thread Marek Polacek
This patch fixes an ICE-on-invalid where we redefine a function whose prototype parameter list contains error_mark_node, which then causes a crash in store_parm_decls_oldstyle. Fixed by adding yet another error_mark_node check. While at it, I fixed wrong formatting in the nearby code. Also use