diff options
| author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-09 22:47:22 +0000 |
|---|---|---|
| committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-09 22:47:22 +0000 |
| commit | 3b77900eb9486a95f2c50f00e73e34ee38c7185c (patch) | |
| tree | 0260400a5ae0929c4cdf1a6cff66f26227bf3605 | |
| parent | 91d8fc2fe06af67cf55afd3d6d42f13038faf3e7 (diff) | |
| download | ppe42-gcc-3b77900eb9486a95f2c50f00e73e34ee38c7185c.tar.gz ppe42-gcc-3b77900eb9486a95f2c50f00e73e34ee38c7185c.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168619 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/c-parser.c | 3 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/testsuite/obj-c++.dg/attributes/invalid-attribute-1.mm | 6 | ||||
| -rw-r--r-- | gcc/testsuite/objc.dg/attributes/invalid-attribute-1.m | 6 |
5 files changed, 25 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e8b28ae6747..bb64fa82ea8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/c-parser.c b/gcc/c-parser.c index cf34e041463..c9b529319ab 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fdef7efea88..0fa673c53c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/obj-c++.dg/attributes/invalid-attribute-1.mm b/gcc/testsuite/obj-c++.dg/attributes/invalid-attribute-1.mm new file mode 100644 index 00000000000..96ee178d760 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/attributes/invalid-attribute-1.mm @@ -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" } */ diff --git a/gcc/testsuite/objc.dg/attributes/invalid-attribute-1.m b/gcc/testsuite/objc.dg/attributes/invalid-attribute-1.m new file mode 100644 index 00000000000..ec17e9d716c --- /dev/null +++ b/gcc/testsuite/objc.dg/attributes/invalid-attribute-1.m @@ -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." } */ |

