1/* Language-specific hook definitions for C front end. 2 Copyright (C) 1991, 1995, 1997, 1998, 3 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free 9Software Foundation; either version 2, or (at your option) any later 10version. 11 12GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13WARRANTY; without even the implied warranty of MERCHANTABILITY or 14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING. If not, write to the Free 19Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 2002110-1301, 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-objc-common.h" 36#include "c-pragma.h" 37 38enum c_language_kind c_language = clk_c; 39 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 43#undef LANG_HOOKS_NAME 44#define LANG_HOOKS_NAME "GNU C" 45#undef LANG_HOOKS_INIT 46#define LANG_HOOKS_INIT c_objc_common_init 47 48/* Each front end provides its own lang hook initializer. */ 49const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; 50 51/* Tree code classes. */ 52 53#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, 54 55const enum tree_code_class tree_code_type[] = { 56#include "tree.def" 57 tcc_exceptional, 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 68const 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 79const char *const tree_code_name[] = { 80#include "tree.def" 81 "@@dummy", 82#include "c-common.def" 83}; 84#undef DEFTREECODE 85 86/* Final processing of file-scope data. The Objective-C version of 87 this function still does something. */ 88void 89finish_file (void) 90{ 91} 92 93#include "gtype-c.h" 94