Delay auto-generating the main function until the end of the first semantic pass
[delight/core.git] / d-gcc-includes.h
blob2c5d84b708aee7bac9f48963fc8cb4a73e5a98d6
1 /* GDC -- D front-end for GCC
2 Copyright (C) 2004 David Friedman
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef GCC_DCMPLR_DC_GCC_INCLUDES_H
20 #define GCC_DCMPLR_DC_GCC_INCLUDES_H
22 extern "C" {
24 // hack needed to prevent inclusion of the generated insn-flags.h
25 // which defines some inline functions that use C prototypes....
26 #define GCC_INSN_FLAGS_H
28 // Conflicting definitions between stdio.h and libiberty.h over the throw()
29 #define HAVE_DECL_ASPRINTF 1
31 #include "config.h"
32 #include "system.h"
34 /* Before gcc 4.0, <stdbool.h> was included before defining bool. In 4.0,
35 it is always defined as "unsigned char" unless __cplusplus. Have to make
36 sure the "bool" under c++ is the same so that structs are laid out
37 correctly. */
38 #if D_GCC_VER >= 40
39 #define bool unsigned char
40 #endif
42 #include "coretypes.h"
43 #include "tm.h"
44 #include "cpplib.h"
45 #include "cppdefault.h"
46 #include "tree.h"
47 #include "real.h"
48 #include "langhooks.h"
49 #include "langhooks-def.h"
50 #include "debug.h"
51 #include "flags.h"
52 #include "toplev.h"
53 #include "target.h"
54 #include "function.h"
55 #include "rtl.h"
56 #include "diagnostic.h"
57 #include "output.h"
58 #include "except.h"
59 #include "libfuncs.h"
60 #include "expr.h"
61 #include "convert.h"
62 #include "ggc.h"
63 #include "opts.h"
64 #include "tm_p.h"
66 #if D_GCC_VER >= 40
67 #include "cgraph.h"
68 #include "tree-iterator.h"
69 #include "tree-gimple.h"
70 #include "tree-dump.h"
71 #include "tree-inline.h"
72 #endif
74 #if D_GCC_VER >= 41
75 #include "vec.h"
76 #endif
79 // Undefine things that give us problems
80 #undef RET
82 // Apple makes 'optimize' a macro
83 static inline int gcc_optimize() { return optimize; }
84 #ifdef optimize
85 #undef optimize
86 #endif
88 #endif