From d0a7822b32f81948b7989aaa65441a22e4b97fbe Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 12 May 2001 17:58:41 +0000 Subject: [PATCH] * c-parse.in (bison parser, init_reswords): Remove uses of doing_objc_thang. * c-tree.h (doing_objc_thang): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42000 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/c-parse.in | 36 +++++++++++++++--------------------- gcc/c-tree.h | 5 ----- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1839c19..8ea9949 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-05-12 Neil Booth + + * c-parse.in (bison parser, init_reswords): Remove uses of + doing_objc_thang. + * c-tree.h (doing_objc_thang): Remove. + 2001-05-12 Neil Booth * cpplex.c (_cpp_lex_token): Ensure we warn at most once diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 253cb29..ab2073e 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -701,32 +701,22 @@ primary: | primary '.' identifier { ifobjc - if (doing_objc_thang) - { - if (is_public ($1, $3)) - $$ = build_component_ref ($1, $3); - else - $$ = error_mark_node; - } - else + if (!is_public ($1, $3)) + $$ = error_mark_node; + else end ifobjc - $$ = build_component_ref ($1, $3); + $$ = build_component_ref ($1, $3); } | primary POINTSAT identifier { tree expr = build_indirect_ref ($1, "->"); ifobjc - if (doing_objc_thang) - { - if (is_public (expr, $3)) - $$ = build_component_ref (expr, $3); - else + if (!is_public (expr, $3)) $$ = error_mark_node; - } - else + else end ifobjc - $$ = build_component_ref (expr, $3); + $$ = build_component_ref (expr, $3); } | primary PLUSPLUS { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); } @@ -3592,10 +3582,12 @@ init_reswords () { unsigned int i; tree id; - int mask = ((doing_objc_thang ? 0 : D_OBJC) - | (flag_isoc99 ? 0 : D_C89) + int mask = (flag_isoc99 ? 0 : D_C89) | (flag_traditional ? D_TRAD : 0) - | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0)); + | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); + + if (c_language != clk_objective_c) + mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because all the trees it points to are permanently interned in the @@ -3715,7 +3707,8 @@ yylexname () if (TREE_CODE (decl) == TYPE_DECL) return TYPENAME; } - else if (doing_objc_thang) +ifobjc + else { tree objc_interface_decl = is_class_name (yylval.ttype); @@ -3725,6 +3718,7 @@ yylexname () return CLASSNAME; } } +end ifobjc return IDENTIFIER; } diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 543a310..c34bd9c 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -359,11 +359,6 @@ extern int system_header_p; /* Warn about implicit declarations. 1 = warning, 2 = error. */ extern int mesg_implicit_function_declaration; -/* Nonzero enables objc features. */ - -#define doing_objc_thang \ - (c_language == clk_objective_c) - /* In c-decl.c */ extern void finish_incomplete_decl PARAMS ((tree)); -- 2.7.4