diff options
-rw-r--r-- | gcc/objc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/obj-c++.dg/proto-error-1.mm | 4 |
4 files changed, 18 insertions, 4 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index ee36565..63c32e3 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2006-07-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR obj-c++/28434 + * objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes. + 2006-06-06 Mike Stump <mrs@apple.com> * objc-act.c: Remove prototype for objc_build_volatilized_type. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 39d12fc..88b9386 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1433,12 +1433,12 @@ lookup_and_install_protocols (tree protocols) tree ident = TREE_VALUE (proto); tree p = lookup_protocol (ident); - if (!p) - error ("cannot find protocol declaration for %qs", - IDENTIFIER_POINTER (ident)); - else + if (p) return_value = chainon (return_value, build_tree_list (NULL_TREE, p)); + else if (ident != error_mark_node) + error ("cannot find protocol declaration for %qs", + IDENTIFIER_POINTER (ident)); } return return_value; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7fef270..e335856 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR obj-c++/28434 + * obj-c++.dg/proto-error-1.mm: New test. + 2006-07-18 Mark Mitchell <mark@codesourcery.com> PR c++/28337 diff --git a/gcc/testsuite/obj-c++.dg/proto-error-1.mm b/gcc/testsuite/obj-c++.dg/proto-error-1.mm new file mode 100644 index 0000000..888db47 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/proto-error-1.mm @@ -0,0 +1,4 @@ +// PR obj-c++/28434 +// { dg-do compile } + +Class<> c; // { dg-error "identifier" } |