This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Improve error on attrs after declarator in a fndef (PR c/60915)


On 04/24/14 08:31, Marek Polacek wrote:
This PR is about not very clear error message when one tries to
add attributes *after* the declarator in a function definition.
cc1plus already handles this well, so I used the same message.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2014-04-24  Marek Polacek  <polacek@redhat.com>

	PR c/60915
	* c-parser.c (c_parser_declaration_or_fndef): Give better error if
	function-definition has an attribute after the declarator.

	* gcc.dg/pr60915.c: New test.
No strong opinions on which of the two is better. Slight preference to sync with g++. You choose. Either is OK for the trunk.
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]