From 43bf5d72a08229da09c59460922275147fe59e48 Mon Sep 17 00:00:00 2001 From: rth Date: Tue, 1 Jun 2004 15:12:23 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82549 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/stub-objc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/stub-objc.c') diff --git a/gcc/stub-objc.c b/gcc/stub-objc.c index 4e7a1987a39..9baa5c553cf 100644 --- a/gcc/stub-objc.c +++ b/gcc/stub-objc.c @@ -69,3 +69,8 @@ objc_message_selector (void) return 0; } +int +objc_is_public (tree expr ATTRIBUTE_UNUSED, tree identifier ATTRIBUTE_UNUSED) +{ + return 1; +} -- cgit v1.2.1