Re: [C++ PATCH] Reject invalid auto foo (), a = 5;

2017-01-04 Thread Jason Merrill
On Tue, Jan 3, 2017 at 5:39 PM, Jakub Jelinek wrote: > + if (auto_function_declaration > + && (TREE_CODE (decl) == FUNCTION_DECL > + || auto_function_declaration != error_mark_node)) > + { > + error_at (decl_specifiers.locations[ds_type_spe

[C++ PATCH] Reject invalid auto foo (), a = 5;

2017-01-03 Thread Jakub Jelinek
Hi! C++14 and above says that for auto specifier in [dcl.spec.auto]/7: "If the init-declarator-list contains more than one init-declarator, they shall all form declarations of variables." The following patch attempts to reject this. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for t