- fixed a lot of 'enum type mixed with ...' warnings
[cparser] / main.c
diff --git a/main.c b/main.c
index 9d60894..b3a9065 100644 (file)
--- a/main.c
+++ b/main.c
 #define fdopen(fd, mode)         _fdopen(fd, mode)
 #define popen(cmd, mode)         _popen(cmd, mode)
 #define pclose(file)             _pclose(file)
+#define unlink(filename)         _unlink(filename)
 
 #else
 #include <unistd.h>
 #define HAVE_MKSTEMP
 #endif
 
-#ifndef WITH_LIBCORE
-#define WITH_LIBCORE
-#endif
-
 #include <libfirm/firm.h>
 #include <libfirm/be.h>
 
@@ -79,6 +76,7 @@
 #include "write_caml.h"
 #include "revision.h"
 #include "warning.h"
+#include "mangle.h"
 
 #ifndef PREPROCESSOR
 #ifdef __APPLE__
 #endif
 
 /** The current c mode/dialect. */
-lang_features_t c_mode = _C89 | _ANSI | _C99 | _GNUC;
+unsigned int c_mode = _C89 | _ANSI | _C99 | _GNUC;
 
 /** The 'machine size', 16, 32 or 64 bit, 32bit is the default. */
 unsigned int machine_size = 32;
@@ -118,6 +116,8 @@ bool use_builtins = false;
 /** we have extern function with const attribute. */
 bool have_const_functions = false;
 
+atomic_type_kind_t wchar_atomic_kind = ATOMIC_TYPE_INT;
+
 /* to switch on printing of implicit casts */
 extern bool print_implicit_casts;
 
@@ -681,8 +681,8 @@ int main(int argc, char **argv)
 
        /* parse rest of options */
        lang_standard_t standard        = STANDARD_DEFAULT;
-       lang_features_t features_on     = 0;
-       lang_features_t features_off    = 0;
+       unsigned        features_on     = 0;
+       unsigned        features_off    = 0;
        filetype_t      forced_filetype = FILETYPE_AUTODETECT;
        bool            help_displayed  = false;
        bool            argument_errors = false;
@@ -1053,6 +1053,7 @@ int main(int argc, char **argv)
        init_ast();
        init_parser();
        init_ast2firm();
+       init_mangle();
 
        if (construct_dep_target) {
                if (outname != 0 && strlen(outname) >= 2) {
@@ -1371,6 +1372,7 @@ do_parsing:
        obstack_free(&ldflags_obst, NULL);
        obstack_free(&file_obst, NULL);
 
+       exit_mangle();
        exit_ast2firm();
        exit_parser();
        exit_ast();