summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-10 02:18:28 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-10 02:18:28 +0000
commit952e555ed2738f11afb7adeba745991b8a8bf1d2 (patch)
tree9eae3f190177c258108b75e7081a965f0c60e1f2 /gcc/c-decl.c
parent3645386fa4928c9f9ae81e41ec776277efda5058 (diff)
downloadgcc-952e555ed2738f11afb7adeba745991b8a8bf1d2.tar.gz
2002-08-09 Ziemowit Laski <zlaski@apple.com>
* c-common.c (flag_objc): New. * c-common.h (c_language_kind): Get rid of clk_objective_c enum value. (flag_objc): New extern declaration. * c-decl.c (implicitly_declare): Call objc_check_decl instead of maybe_objc_check_decl. (finish_decl): Likewise. (grokfield): Likewise. (finish_struct): Likewise. * c-lang.c (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-lex.c (lex_charconst): Remove uses of clk_objective_c, replace with flag_objc as needed. * c-opts.c (c_common_init_options): Likewise. (c_common_decode_option): Likewise. * c-parse.in (init_reswords): Likewise. * c-tree.h (maybe_objc_check_decl): Rename to objc_check_decl. (maybe_objc_comptypes): Rename to objc_comptypes. (maybe_building_objc_message_expr): Rename to objc_message_selector. * c-typeck.c (comptypes): Call objc_comptypes instead of maybe_objc_comptypes, and/or objc_message_selector instead of (comp_target_types): Likewise. (convert_for_assignment): Likewise. (warn_for_assignment): Likewise. * cppinit.c (init_builtins): Set __OBJC__ manifest constant independently of those for other languages. * objc/objc-act.c (maybe_objc_comptypes): Delete. (maybe_objc_check_decl): Delete. (maybe_building_objc_message_expr): Rename to objc_message_selector. * objc/objc-lang.c (objc_init_options): Use clk_c instead of clk_objective_c; set flag_objc flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 73442927459..7a926cf2ab0 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2059,8 +2059,9 @@ implicitly_declare (functionid)
So we record the decl in the standard fashion. */
pushdecl (decl);
- /* This is a no-op in c-lang.c or something real in objc-actions.c. */
- maybe_objc_check_decl (decl);
+ /* This is a no-op in c-lang.c or something real in objc-act.c. */
+ if (flag_objc)
+ objc_check_decl (decl);
rest_of_decl_compilation (decl, NULL, 0, 0);
@@ -3097,8 +3098,9 @@ finish_decl (decl, init, asmspec_tree)
if (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL)
{
- /* This is a no-op in c-lang.c or something real in objc-actions.c. */
- maybe_objc_check_decl (decl);
+ /* This is a no-op in c-lang.c or something real in objc-act.c. */
+ if (flag_objc)
+ objc_check_decl (decl);
if (!DECL_CONTEXT (decl))
{
@@ -3160,8 +3162,9 @@ finish_decl (decl, init, asmspec_tree)
if (TREE_CODE (decl) == TYPE_DECL)
{
- /* This is a no-op in c-lang.c or something real in objc-actions.c. */
- maybe_objc_check_decl (decl);
+ /* This is a no-op in c-lang.c or something real in objc-act.c. */
+ if (flag_objc)
+ objc_check_decl (decl);
rest_of_decl_compilation (decl, NULL, DECL_CONTEXT (decl) == 0, 0);
}
@@ -5009,7 +5012,8 @@ grokfield (filename, line, declarator, declspecs, width)
finish_decl (value, NULL_TREE, NULL_TREE);
DECL_INITIAL (value) = width;
- maybe_objc_check_decl (value);
+ if (flag_objc)
+ objc_check_decl (value);
return value;
}
@@ -5297,8 +5301,9 @@ finish_struct (t, fieldlist, attributes)
&& TREE_CODE (decl) != TYPE_DECL)
{
layout_decl (decl, 0);
- /* This is a no-op in c-lang.c or something real in objc-actions.c. */
- maybe_objc_check_decl (decl);
+ /* This is a no-op in c-lang.c or something real in objc-act.c. */
+ if (flag_objc)
+ objc_check_decl (decl);
rest_of_decl_compilation (decl, NULL, toplevel, 0);
if (! toplevel)
expand_decl (decl);
@@ -5320,7 +5325,8 @@ finish_struct (t, fieldlist, attributes)
if (TREE_CODE (decl) != TYPE_DECL)
{
layout_decl (decl, 0);
- maybe_objc_check_decl (decl);
+ if (flag_objc)
+ objc_check_decl (decl);
rest_of_decl_compilation (decl, NULL, toplevel, 0);
if (! toplevel)
expand_decl (decl);