aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.h
diff options
context:
space:
mode:
authorZiemowit Laski <zlaski@apple.com>2001-08-01 08:10:00 +0000
committerStan Shebs <shebs@gcc.gnu.org>2001-08-01 08:10:00 +0000
commitf2e6e5307bece75988f49a2d69d56f2e83c35dda (patch)
tree648dd272baeb69450a07f51b1c4e7565b12eafb1 /gcc/objc/objc-act.h
parent80858e66df3f4aa8b0b27cf1006cb33541490655 (diff)
downloadgcc-f2e6e5307bece75988f49a2d69d56f2e83c35dda.zip
gcc-f2e6e5307bece75988f49a2d69d56f2e83c35dda.tar.gz
gcc-f2e6e5307bece75988f49a2d69d56f2e83c35dda.tar.bz2
c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for contextualizing Objective-C class name lookup by the...
2001-08-01 Ziemowit Laski <zlaski@apple.com> * c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for contextualizing Objective-C class name lookup by the lexer. (typespec_reserved_nonattr): Disable ObjC class name lookup after seeing a TYPESPEC. (protocoldef): Add support for forward @protocol declarations. (yylexname): Suppress ObjC class name lookup in certain contexts; re-enable after lookup is complete. (_yylex): Re-enable ObjC class name lookup when certain punctuation marks are seen. * objc/objc-act.c (check_protocol_recursively): New function used for finding circular dependencies in protocols. (objc_declare_protocols): New function for handling forward @protocol declarations. (receiver_is_class_object): Detect the case when 'self' is used inside of a class method. (build_message_expr): Issue a warning if class method is desired but instance method is found instead. (conforms_to_protocol): Streamline. (objc_comptypes): Detect the fact that 'Bar<Foo> foo' conforms to protocol Foo, even if 'Bar foo' does not. (check_protocols): Streamline. (start_protocol): Add checks for circular and duplicate protocol definitions. (encode_aggregate_within): For typedefs of structs, encode the underlying struct. * objc/objc-act.h (PROTOCOL_DEFINED): New tree accessor. (objc_declare_protocols): New prototype. From-SVN: r44536
Diffstat (limited to 'gcc/objc/objc-act.h')
-rw-r--r--gcc/objc/objc-act.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index f13acc8..e659f91 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -1,5 +1,5 @@
/* Declarations for objc-act.c.
- Copyright (C) 1990, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1990, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -59,6 +59,7 @@ extern tree objc_ellipsis_node;
void objc_declare_alias PARAMS ((tree, tree));
void objc_declare_class PARAMS ((tree));
+void objc_declare_protocols PARAMS ((tree));
extern int objc_receiver_context;
@@ -101,6 +102,7 @@ tree build_encode_expr PARAMS ((tree));
#define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval)
#define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1)
+#define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS)
#define TYPE_PROTOCOL_LIST(TYPE) ((TYPE)->type.context)
/* Define the Objective-C or Objective-C++ language-specific tree codes. */