]> gcc.gnu.org Git - gcc.git/blame - gcc/objc/objc-lang.c
c-common.h (enum rid): Add RID_CXX_COMPAT_WARN.
[gcc.git] / gcc / objc / objc-lang.c
CommitLineData
4e089a75 1/* Language-dependent hooks for Objective-C.
2b7d992a
NC
2 Copyright 2001, 2002, 2003, 2004, 2005, 2007
3 Free Software Foundation, Inc.
4e089a75
ZL
4 Contributed by Ziemowit Laski <zlaski@apple.com>
5
b9593599 6This file is part of GCC.
4e089a75 7
b9593599 8GCC is free software; you can redistribute it and/or modify
4e089a75 9it under the terms of the GNU General Public License as published by
2b7d992a 10the Free Software Foundation; either version 3, or (at your option)
4e089a75
ZL
11any later version.
12
b9593599 13GCC is distributed in the hope that it will be useful,
4e089a75
ZL
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
2b7d992a
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
21
4e089a75
ZL
22
23#include "config.h"
24#include "system.h"
4977bab6
ZW
25#include "coretypes.h"
26#include "tm.h"
4e089a75
ZL
27#include "tree.h"
28#include "c-tree.h"
29#include "c-common.h"
9a4d6480 30#include "ggc.h"
4e089a75
ZL
31#include "objc-act.h"
32#include "langhooks.h"
33#include "langhooks-def.h"
9a4d6480 34#include "diagnostic.h"
9a4d6480 35#include "c-objc-common.h"
4e089a75 36
37fa72e9 37enum c_language_kind c_language = clk_objc;
820cc88f 38static void objc_init_ts (void);
4e089a75 39
9a4d6480
ZL
40/* Lang hooks common to C and ObjC are declared in c-objc-common.h;
41 consequently, there should be very few hooks below. */
42
4e089a75 43#undef LANG_HOOKS_NAME
4b65dba1 44#define LANG_HOOKS_NAME "GNU Objective-C"
4e089a75
ZL
45#undef LANG_HOOKS_INIT
46#define LANG_HOOKS_INIT objc_init
7afff7cf
NB
47#undef LANG_HOOKS_DECL_PRINTABLE_NAME
48#define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name
43f479d6
DJ
49#undef LANG_HOOKS_GIMPLIFY_EXPR
50#define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
51#undef LANG_HOOKS_GET_CALLEE_FNDECL
52#define LANG_HOOKS_GET_CALLEE_FNDECL objc_get_callee_fndecl
820cc88f
DB
53#undef LANG_HOOKS_INIT_TS
54#define LANG_HOOKS_INIT_TS objc_init_ts
4e089a75 55
9a4d6480
ZL
56/* Each front end provides its own lang hook initializer. */
57const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
2f9834e8 58
9a4d6480
ZL
59/* Lang hook routines common to C and ObjC appear in c-objc-common.c;
60 there should be very few (if any) routines below. */
61
820cc88f
DB
62static void
63objc_init_ts (void)
64{
65 tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
66 tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_NON_COMMON] = 1;
67 tree_contains_struct[KEYWORD_DECL][TS_DECL_NON_COMMON] = 1;
68
69 tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
70 tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WITH_VIS] = 1;
71 tree_contains_struct[KEYWORD_DECL][TS_DECL_WITH_VIS] = 1;
72
73 tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_WRTL] = 1;
74 tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_WRTL] = 1;
75 tree_contains_struct[KEYWORD_DECL][TS_DECL_WRTL] = 1;
76
77 tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_MINIMAL] = 1;
78 tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_MINIMAL] = 1;
79 tree_contains_struct[KEYWORD_DECL][TS_DECL_MINIMAL] = 1;
80
81 tree_contains_struct[CLASS_METHOD_DECL][TS_DECL_COMMON] = 1;
82 tree_contains_struct[INSTANCE_METHOD_DECL][TS_DECL_COMMON] = 1;
83 tree_contains_struct[KEYWORD_DECL][TS_DECL_COMMON] = 1;
84}
85
9a4d6480
ZL
86void
87finish_file (void)
88{
89 objc_finish_file ();
90}
91
92#include "gtype-objc.h"
This page took 2.230859 seconds and 5 git commands to generate.