OSDN Git Service

5217102224f0f6124d93ba349203977744fd44e6
[pf3gnuchains/gcc-fork.git] / gcc / c-lang.c
1 /* Language-specific hook definitions for C front end.
2    Copyright (C) 1991, 1995, 1997, 1998,
3    1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
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.
11
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.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tm.h"
27 #include "tree.h"
28 #include "c-tree.h"
29 #include "c-common.h"
30 #include "ggc.h"
31 #include "langhooks.h"
32 #include "langhooks-def.h"
33 #include "tree-inline.h"
34 #include "diagnostic.h"
35 #include "c-pretty-print.h"
36 #include "c-objc-common.h"
37 #include "c-pragma.h"
38
39 enum c_language_kind c_language = clk_c;
40
41 /* Lang hooks common to C and ObjC are declared in c-objc-common.h;
42    consequently, there should be very few hooks below.  */
43
44 #undef LANG_HOOKS_NAME
45 #define LANG_HOOKS_NAME "GNU C"
46 #undef LANG_HOOKS_INIT
47 #define LANG_HOOKS_INIT c_objc_common_init
48
49 /* Each front end provides its own lang hook initializer.  */
50 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
51
52 /* Tree code classes.  */
53
54 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
55
56 const enum tree_code_class tree_code_type[] = {
57 #include "tree.def"
58   tcc_exceptional,
59 #include "c-common.def"
60 };
61 #undef DEFTREECODE
62
63 /* Table indexed by tree code giving number of expression
64    operands beyond the fixed part of the node structure.
65    Not used for types or decls.  */
66
67 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
68
69 const unsigned char tree_code_length[] = {
70 #include "tree.def"
71   0,
72 #include "c-common.def"
73 };
74 #undef DEFTREECODE
75
76 /* Names of tree components.
77    Used for printing out the tree and error messages.  */
78 #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
79
80 const char *const tree_code_name[] = {
81 #include "tree.def"
82   "@@dummy",
83 #include "c-common.def"
84 };
85 #undef DEFTREECODE
86
87 /* Final processing of file-scope data.  The Objective-C version of
88    this function still does something.  */
89 void
90 finish_file (void)
91 {
92 }
93
94 #include "gtype-c.h"