annotate gcc/c/c-lang.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Language-specific hook definitions for C front end.
kono
parents:
diff changeset
2 Copyright (C) 1991-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #include "config.h"
kono
parents:
diff changeset
22 #include "system.h"
kono
parents:
diff changeset
23 #include "coretypes.h"
kono
parents:
diff changeset
24 #include "c-tree.h"
kono
parents:
diff changeset
25 #include "langhooks.h"
kono
parents:
diff changeset
26 #include "langhooks-def.h"
kono
parents:
diff changeset
27 #include "c-objc-common.h"
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 enum c_language_kind c_language = clk_c;
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 /* Lang hooks common to C and ObjC are declared in c-objc-common.h;
kono
parents:
diff changeset
32 consequently, there should be very few hooks below. */
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 #undef LANG_HOOKS_NAME
kono
parents:
diff changeset
35 #define LANG_HOOKS_NAME "GNU C"
kono
parents:
diff changeset
36 #undef LANG_HOOKS_INIT
kono
parents:
diff changeset
37 #define LANG_HOOKS_INIT c_objc_common_init
kono
parents:
diff changeset
38 #undef LANG_HOOKS_INIT_TS
kono
parents:
diff changeset
39 #define LANG_HOOKS_INIT_TS c_common_init_ts
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 #if CHECKING_P
kono
parents:
diff changeset
42 #undef LANG_HOOKS_RUN_LANG_SELFTESTS
kono
parents:
diff changeset
43 #define LANG_HOOKS_RUN_LANG_SELFTESTS selftest::run_c_tests
kono
parents:
diff changeset
44 #endif /* #if CHECKING_P */
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 #undef LANG_HOOKS_GET_SUBSTRING_LOCATION
kono
parents:
diff changeset
47 #define LANG_HOOKS_GET_SUBSTRING_LOCATION c_get_substring_location
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 /* Each front end provides its own lang hook initializer. */
kono
parents:
diff changeset
50 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 #if CHECKING_P
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 namespace selftest {
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 /* Implementation of LANG_HOOKS_RUN_LANG_SELFTESTS for the C frontend. */
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 void
kono
parents:
diff changeset
59 run_c_tests (void)
kono
parents:
diff changeset
60 {
kono
parents:
diff changeset
61 /* Run selftests shared within the C family. */
kono
parents:
diff changeset
62 c_family_tests ();
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 /* Additional C-specific tests. */
kono
parents:
diff changeset
65 }
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 } // namespace selftest
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 #endif /* #if CHECKING_P */
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 #include "gtype-c.h"