118334Speter/* Language-specific hook definitions for C front end.
290075Sobrien   Copyright (C) 1991, 1995, 1997, 1998,
3169689Skan   1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
418334Speter
590075SobrienThis file is part of GCC.
618334Speter
790075SobrienGCC is free software; you can redistribute it and/or modify it under
890075Sobrienthe terms of the GNU General Public License as published by the Free
990075SobrienSoftware Foundation; either version 2, or (at your option) any later
1090075Sobrienversion.
1118334Speter
1290075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY
1390075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or
1490075SobrienFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1590075Sobrienfor more details.
1618334Speter
1718334SpeterYou should have received a copy of the GNU General Public License
1890075Sobrienalong with GCC; see the file COPYING.  If not, write to the Free
19169689SkanSoftware Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20169689Skan02110-1301, USA.  */
2118334Speter
2218334Speter
2318334Speter#include "config.h"
2450397Sobrien#include "system.h"
25132718Skan#include "coretypes.h"
26132718Skan#include "tm.h"
2718334Speter#include "tree.h"
2850397Sobrien#include "c-tree.h"
29117395Skan#include "c-common.h"
30117395Skan#include "ggc.h"
3190075Sobrien#include "langhooks.h"
3290075Sobrien#include "langhooks-def.h"
33169689Skan#include "tree-inline.h"
34132718Skan#include "diagnostic.h"
35169689Skan#include "c-objc-common.h"
36169689Skan#include "c-pragma.h"
3718334Speter
38132718Skanenum c_language_kind c_language = clk_c;
39132718Skan
40169689Skan/* Lang hooks common to C and ObjC are declared in c-objc-common.h;
41169689Skan   consequently, there should be very few hooks below.  */
4218334Speter
4390075Sobrien#undef LANG_HOOKS_NAME
4490075Sobrien#define LANG_HOOKS_NAME "GNU C"
4590075Sobrien#undef LANG_HOOKS_INIT
46117395Skan#define LANG_HOOKS_INIT c_objc_common_init
4750397Sobrien
48169689Skan/* Each front end provides its own lang hook initializer.  */
4990075Sobrienconst struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
5090075Sobrien
51117395Skan/* Tree code classes.  */
52117395Skan
53117395Skan#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
54117395Skan
55169689Skanconst enum tree_code_class tree_code_type[] = {
56117395Skan#include "tree.def"
57169689Skan  tcc_exceptional,
58117395Skan#include "c-common.def"
59117395Skan};
60117395Skan#undef DEFTREECODE
61117395Skan
62117395Skan/* Table indexed by tree code giving number of expression
63117395Skan   operands beyond the fixed part of the node structure.
64117395Skan   Not used for types or decls.  */
65117395Skan
66117395Skan#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
67117395Skan
68117395Skanconst unsigned char tree_code_length[] = {
69117395Skan#include "tree.def"
70117395Skan  0,
71117395Skan#include "c-common.def"
72117395Skan};
73117395Skan#undef DEFTREECODE
74117395Skan
75117395Skan/* Names of tree components.
76117395Skan   Used for printing out the tree and error messages.  */
77117395Skan#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
78117395Skan
79117395Skanconst char *const tree_code_name[] = {
80117395Skan#include "tree.def"
81117395Skan  "@@dummy",
82117395Skan#include "c-common.def"
83117395Skan};
84117395Skan#undef DEFTREECODE
85117395Skan
86169689Skan/* Final processing of file-scope data.  The Objective-C version of
87169689Skan   this function still does something.  */
8818334Spetervoid
89132718Skanfinish_file (void)
9018334Speter{
9118334Speter}
9218334Speter
93117395Skan#include "gtype-c.h"
94