Merge from trunk: 215733-215743
[official-gcc.git] / gcc-4_7 / gcc / c-lang.c
blobd2dfe25210d8a5337777362a0b5145006e2770a3
1 /* Language-specific hook definitions for C front end.
2 Copyright (C) 1991, 1995, 1997, 1998,
3 1999, 2000, 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
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-family/c-common.h"
30 #include "langhooks.h"
31 #include "langhooks-def.h"
32 #include "tree-inline.h"
33 #include "diagnostic-core.h"
34 #include "c-objc-common.h"
35 #include "c-family/c-pragma.h"
37 enum c_language_kind c_language = clk_c;
39 /* Lang hooks common to C and ObjC are declared in c-objc-common.h;
40 consequently, there should be very few hooks below. */
42 #undef LANG_HOOKS_NAME
43 #define LANG_HOOKS_NAME "GNU C"
44 #undef LANG_HOOKS_INIT
45 #define LANG_HOOKS_INIT c_objc_common_init
46 #undef LANG_HOOKS_INIT_TS
47 #define LANG_HOOKS_INIT_TS c_common_init_ts
49 /* LIPO support. */
50 #undef LANG_HOOKS_ADD_BUILT_IN_DECL
51 #define LANG_HOOKS_ADD_BUILT_IN_DECL c_add_built_in_decl
52 #undef LANG_HOOKS_SAVE_BUILT_IN_PRE
53 #define LANG_HOOKS_SAVE_BUILT_IN_PRE c_save_built_in_decl_pre_parsing
54 #undef LANG_HOOKS_RESTORE_BUILT_IN_PRE
55 #define LANG_HOOKS_RESTORE_BUILT_IN_PRE c_restore_built_in_decl_pre_parsing
56 #undef LANG_HOOKS_SAVE_BUILT_IN_POST
57 #define LANG_HOOKS_SAVE_BUILT_IN_POST c_save_built_in_decl_post_parsing
58 #undef LANG_HOOKS_RESTORE_BUILT_IN_POST
59 #define LANG_HOOKS_RESTORE_BUILT_IN_POST c_restore_built_in_decl_post_parsing
60 #undef LANG_HOOKS_HAS_GLOBAL_NAME
61 #define LANG_HOOKS_HAS_GLOBAL_NAME c_is_global_scope
62 #undef LANG_HOOKS_GET_LANG_DECL_SIZE
63 #define LANG_HOOKS_GET_LANG_DECL_SIZE c_get_lang_decl_size
64 #undef LANG_HOOKS_IS_GENERATED_TYPE
65 #define LANG_HOOKS_IS_GENERATED_TYPE c_is_compiler_generated_type
66 #undef LANG_HOOKS_CMP_LANG_TYPE
67 #define LANG_HOOKS_CMP_LANG_TYPE c_cmp_lang_type
70 /* Each front end provides its own lang hook initializer. */
71 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
73 #include "gtype-c.h"