Commit a3eaca15 by Neil Booth Committed by Neil Booth

c-parse.in (bison parser, [...]): Remove uses of doing_objc_thang.

	* c-parse.in (bison parser, init_reswords): Remove uses of
	doing_objc_thang.
	* c-tree.h (doing_objc_thang): Remove.

From-SVN: r42000
parent c66ce1f5
2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* 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 <neil@daikokuya.demon.co.uk> 2001-05-12 Neil Booth <neil@daikokuya.demon.co.uk>
* cpplex.c (_cpp_lex_token): Ensure we warn at most once * cpplex.c (_cpp_lex_token): Ensure we warn at most once
......
...@@ -701,32 +701,22 @@ primary: ...@@ -701,32 +701,22 @@ primary:
| primary '.' identifier | primary '.' identifier
{ {
ifobjc ifobjc
if (doing_objc_thang) if (!is_public ($1, $3))
{ $$ = error_mark_node;
if (is_public ($1, $3)) else
$$ = build_component_ref ($1, $3);
else
$$ = error_mark_node;
}
else
end ifobjc end ifobjc
$$ = build_component_ref ($1, $3); $$ = build_component_ref ($1, $3);
} }
| primary POINTSAT identifier | primary POINTSAT identifier
{ {
tree expr = build_indirect_ref ($1, "->"); tree expr = build_indirect_ref ($1, "->");
ifobjc ifobjc
if (doing_objc_thang) if (!is_public (expr, $3))
{
if (is_public (expr, $3))
$$ = build_component_ref (expr, $3);
else
$$ = error_mark_node; $$ = error_mark_node;
} else
else
end ifobjc end ifobjc
$$ = build_component_ref (expr, $3); $$ = build_component_ref (expr, $3);
} }
| primary PLUSPLUS | primary PLUSPLUS
{ $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); } { $$ = build_unary_op (POSTINCREMENT_EXPR, $1, 0); }
...@@ -3592,10 +3582,12 @@ init_reswords () ...@@ -3592,10 +3582,12 @@ init_reswords ()
{ {
unsigned int i; unsigned int i;
tree id; tree id;
int mask = ((doing_objc_thang ? 0 : D_OBJC) int mask = (flag_isoc99 ? 0 : D_C89)
| (flag_isoc99 ? 0 : D_C89)
| (flag_traditional ? D_TRAD : 0) | (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 /* It is not necessary to register ridpointers as a GC root, because
all the trees it points to are permanently interned in the all the trees it points to are permanently interned in the
...@@ -3715,7 +3707,8 @@ yylexname () ...@@ -3715,7 +3707,8 @@ yylexname ()
if (TREE_CODE (decl) == TYPE_DECL) if (TREE_CODE (decl) == TYPE_DECL)
return TYPENAME; return TYPENAME;
} }
else if (doing_objc_thang) ifobjc
else
{ {
tree objc_interface_decl = is_class_name (yylval.ttype); tree objc_interface_decl = is_class_name (yylval.ttype);
...@@ -3725,6 +3718,7 @@ yylexname () ...@@ -3725,6 +3718,7 @@ yylexname ()
return CLASSNAME; return CLASSNAME;
} }
} }
end ifobjc
return IDENTIFIER; return IDENTIFIER;
} }
......
...@@ -359,11 +359,6 @@ extern int system_header_p; ...@@ -359,11 +359,6 @@ extern int system_header_p;
/* Warn about implicit declarations. 1 = warning, 2 = error. */ /* Warn about implicit declarations. 1 = warning, 2 = error. */
extern int mesg_implicit_function_declaration; extern int mesg_implicit_function_declaration;
/* Nonzero enables objc features. */
#define doing_objc_thang \
(c_language == clk_objective_c)
/* In c-decl.c */ /* In c-decl.c */
extern void finish_incomplete_decl PARAMS ((tree)); extern void finish_incomplete_decl PARAMS ((tree));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment