In gcc/: 2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com>

In gcc/:
2011-01-09  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47232
	* c-parser.c (c_parser_declaration_or_fndef): Improved
	error message.

In gcc/testsuite/:
2011-01-09  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR objc/47232
	* objc.dg/attributes/invalid-attribute-1.m: New.
	* obj-c++.dg/attributes/invalid-attribute-1.mm: New.

From-SVN: r168619
This commit is contained in:
Nicola Pero 2011-01-09 22:47:22 +00:00 committed by Nicola Pero
parent 8977b4bb0d
commit 96bbfbacda
5 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47232
* c-parser.c (c_parser_declaration_or_fndef): Improved
error message.
2011-01-09 Kai Tietz <kai.tietz@onevision.com>
* config/i386/winnt.c (i386_pe_start_function): Make sure

View File

@ -1555,8 +1555,7 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
case RID_AT_PROPERTY:
if (specs->attrs)
{
c_parser_error (parser,
"attributes may not be specified before" );
c_parser_error (parser, "unexpected attribute");
specs->attrs = NULL;
}
break;

View File

@ -1,3 +1,9 @@
2011-01-09 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47232
* objc.dg/attributes/invalid-attribute-1.m: New.
* obj-c++.dg/attributes/invalid-attribute-1.mm: New.
2011-01-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/47224

View File

@ -0,0 +1,6 @@
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, January 2011. */
/* { dg-do compile } */
#include <objc/objc.h>
__attribute__ ((deprecated)) @class A; /* { dg-error "attributes may not be specified before the ..class. Objective-C.. keyword" } */

View File

@ -0,0 +1,6 @@
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, January 2011. */
/* { dg-do compile } */
#include <objc/objc.h>
__attribute__ ((deprecated)) @class A; /* { dg-error "unexpected attribute before .class." } */