diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2004-06-01 08:12:23 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-06-01 08:12:23 -0700 |
commit | 7a3ea2011be31e937186df05335f665a8a983028 (patch) | |
tree | bfb9b2da79e35521eae05ac845e476d726baa281 /gcc/objc | |
parent | c4ec6988bc930288ea6c7fa2ec67a6cfbd0c0d73 (diff) | |
download | gcc-7a3ea2011be31e937186df05335f665a8a983028.zip gcc-7a3ea2011be31e937186df05335f665a8a983028.tar.gz gcc-7a3ea2011be31e937186df05335f665a8a983028.tar.bz2 |
c-parse.in (OFFSETOF, [...]): New.
* c-parse.in (OFFSETOF, offsetof_member_designator): New.
(primary): Handle offsetof. Add error productions for faux functions.
Move component_ref objc checking to build_component_ref.
(reswords): Add offsetof.
(rid_to_yy): Add offsetof.
* c-tree.h (build_offsetof): Declare.
* c-common.h (objc_is_public): Declare.
* c-typeck.c (build_component_ref): Check objc_is_public.
(build_offsetof): New.
* stub-objc.c (objc_is_public): New.
* objc/objc-act.c, objc/objc-act.h (objc_is_public): Rename
from is_public.
* ginclude/stddef.h (offsetof): Use __builtin_offsetof.
* doc/extend.texi (Offsetof): Move from C++ section to C section
and rewrite for __builtin_offsetof.
cp/
* lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
* parser.c (struct cp_parser): Remove in_offsetof.
(cp_parser_new): Don't set it.
(cp_parser_unary_expression): Don't check it.
(cp_parser_postfix_open_square_expression): Split out from ...
(cp_parser_postfix_expression): ... here.
(cp_parser_postfix_dot_deref_expression): Likewise.
(cp_parser_builtin_offsetof): New.
(cp_parser_primary_expression): Use it.
testsuite/
* g++.dg/template/dependent-expr4.C: Use __builtin_offsetof.
From-SVN: r82549
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 2 | ||||
-rw-r--r-- | gcc/objc/objc-act.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 0707433..791f320 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -6475,7 +6475,7 @@ is_private (tree decl) /* We have an instance variable reference;, check to see if it is public. */ int -is_public (tree expr, tree identifier) +objc_is_public (tree expr, tree identifier) { tree basetype = TREE_TYPE (expr); enum tree_code code = TREE_CODE (basetype); diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index db7eeca..5738bc9 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -52,7 +52,7 @@ tree objc_build_finally_epilogue (void); tree is_ivar (tree, tree); int is_private (tree); -int is_public (tree, tree); +int objc_is_public (tree, tree); tree add_instance_variable (tree, int, tree, tree, tree); tree objc_add_method (tree, tree, int); tree get_super_receiver (void); @@ -126,7 +126,7 @@ tree build_encode_expr (tree); ? (TYPE)->type.context : NULL_TREE) #define SET_TYPE_PROTOCOL_LIST(TYPE, P) (TYPE_CHECK (TYPE)->type.context = (P)) -/* Set by `continue_class' and checked by `is_public'. */ +/* Set by `continue_class' and checked by `objc_is_public'. */ #define TREE_STATIC_TEMPLATE(record_type) (TREE_PUBLIC (record_type)) #define TYPED_OBJECT(type) \ |