]>
Commit | Line | Data |
---|---|---|
c0f940ef | 1 | /* Language-specific hook definitions for C front end. |
517cbe13 | 2 | Copyright (C) 1991, 1995, 1997, 1998, |
ad616de1 | 3 | 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
c0f940ef | 4 | |
1322177d | 5 | This file is part of GCC. |
c0f940ef | 6 | |
1322177d LB |
7 | GCC is free software; you can redistribute it and/or modify it under |
8 | the terms of the GNU General Public License as published by the Free | |
9 | Software Foundation; either version 2, or (at your option) any later | |
10 | version. | |
c0f940ef | 11 | |
1322177d LB |
12 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
c0f940ef RS |
16 | |
17 | You should have received a copy of the GNU General Public License | |
1322177d | 18 | along with GCC; see the file COPYING. If not, write to the Free |
366ccddb KC |
19 | Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA |
20 | 02110-1301, USA. */ | |
c0f940ef RS |
21 | |
22 | ||
23 | #include "config.h" | |
670ee920 | 24 | #include "system.h" |
4977bab6 ZW |
25 | #include "coretypes.h" |
26 | #include "tm.h" | |
c0f940ef | 27 | #include "tree.h" |
8f17b5c5 | 28 | #include "c-tree.h" |
52dabb6c | 29 | #include "c-common.h" |
e2500fed | 30 | #include "ggc.h" |
69dcadff | 31 | #include "langhooks.h" |
d23c55c2 | 32 | #include "langhooks-def.h" |
6de9cd9a | 33 | #include "tree-inline.h" |
4b780675 | 34 | #include "diagnostic.h" |
9a4d6480 | 35 | #include "c-objc-common.h" |
86f029aa | 36 | #include "c-pragma.h" |
4b780675 | 37 | |
37fa72e9 | 38 | enum c_language_kind c_language = clk_c; |
0abc6a6a | 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. */ | |
cd2a3ba2 | 42 | |
3ac88239 NB |
43 | #undef LANG_HOOKS_NAME |
44 | #define LANG_HOOKS_NAME "GNU C" | |
69dcadff | 45 | #undef LANG_HOOKS_INIT |
460bd0e3 | 46 | #define LANG_HOOKS_INIT c_objc_common_init |
6de9cd9a | 47 | |
9a4d6480 | 48 | /* Each front end provides its own lang hook initializer. */ |
3ac88239 | 49 | const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; |
cd2a3ba2 | 50 | |
2f9834e8 KG |
51 | /* Tree code classes. */ |
52 | ||
53 | #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, | |
54 | ||
6615c446 | 55 | const enum tree_code_class tree_code_type[] = { |
2f9834e8 | 56 | #include "tree.def" |
6615c446 | 57 | tcc_exceptional, |
2f9834e8 KG |
58 | #include "c-common.def" |
59 | }; | |
60 | #undef DEFTREECODE | |
61 | ||
62 | /* Table indexed by tree code giving number of expression | |
63 | operands beyond the fixed part of the node structure. | |
64 | Not used for types or decls. */ | |
65 | ||
66 | #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, | |
67 | ||
68 | const unsigned char tree_code_length[] = { | |
69 | #include "tree.def" | |
70 | 0, | |
71 | #include "c-common.def" | |
72 | }; | |
73 | #undef DEFTREECODE | |
74 | ||
75 | /* Names of tree components. | |
76 | Used for printing out the tree and error messages. */ | |
77 | #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, | |
78 | ||
79 | const char *const tree_code_name[] = { | |
80 | #include "tree.def" | |
81 | "@@dummy", | |
82 | #include "c-common.def" | |
83 | }; | |
84 | #undef DEFTREECODE | |
85 | ||
36c1b0de ZW |
86 | /* Final processing of file-scope data. The Objective-C version of |
87 | this function still does something. */ | |
2c5f4139 | 88 | void |
3346b668 | 89 | finish_file (void) |
2c5f4139 | 90 | { |
2c5f4139 | 91 | } |
e2500fed GK |
92 | |
93 | #include "gtype-c.h" |