summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-28 20:58:56 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-28 20:58:56 +0000
commit11a35d8f8b4f3342ab92cb342c1760c5cf89831e (patch)
tree1139533b6dad212124a620afe1309ed4b3b484f3 /gcc/objc
parenta2784d66a1b5767f47ec8d93f97cc73008af89c3 (diff)
downloadgcc-11a35d8f8b4f3342ab92cb342c1760c5cf89831e.tar.gz
[gcc/ChangeLog]
2004-08-28 Ziemowit Laski <zlaski@apple.com> * c-common.h: Update comments about ObjC/ObjC++ entry points. (objc_is_reserved_word): New prototype. (get_current_scope, objc_mark_locals_volatile): Move prototypes to separate section; these are call-backs. * c-lex.c (c_lex_with_flags): Call objc_is_reserved_word() to detect ObjC/ObjC++ "@" keywords. * c-tree.h (get_current_scope, objc_mark_locals_volatile): Remove prototypes; they already live in c-common.h. * stub-objc.c: Update copyright notice. (objc_is_reserved_word): New stub. [gcc/cp/ChangeLog] 2004-08-28 Ziemowit Laski <zlaski@apple.com> * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and CXX_AND_OBJCXX_OBJS. (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing separately on the link line. [gcc/objc/ChangeLog] 2004-08-28 Ziemowit Laski <zlaski@apple.com> * objc-act.c (objc_is_reserved_word): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog4
-rw-r--r--gcc/objc/objc-act.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index d9f42f9df90..dc97ef5b5b8 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-28 Ziemowit Laski <zlaski@apple.com>
+
+ * objc-act.c (objc_is_reserved_word): New function.
+
2004-08-15 Ziemowit Laski <zlaski@apple.com>
* Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index bc5da033e25..afc22d39c45 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -608,6 +608,23 @@ lookup_protocol_in_reflist (tree rproto_list, tree lproto)
return 0;
}
+/* Return 1 if IDENT is an ObjC/ObjC++ reserved keyword in the context of
+ an '@'. */
+
+int
+objc_is_reserved_word (tree ident)
+{
+ unsigned char code = C_RID_CODE (ident);
+
+ return (OBJC_IS_AT_KEYWORD (code)
+#ifdef OBJCPLUS
+ || code == RID_CLASS || code == RID_PUBLIC
+ || code == RID_PROTECTED || code == RID_PRIVATE
+ || code == RID_TRY || code == RID_THROW || code == RID_CATCH
+#endif
+ );
+}
+
/* Return true if TYPE is 'id'. */
static bool