implement atomic entity initialisation
[cparser] / main.c
diff --git a/main.c b/main.c
index a646523..c44fba6 100644 (file)
--- a/main.c
+++ b/main.c
@@ -5,6 +5,10 @@
 #include <errno.h>
 #include <string.h>
 
+#ifndef WITH_LIBCORE
+#define WITH_LIBCORE
+#endif
+
 #include <libfirm/firm.h>
 #include <libfirm/be.h>
 
@@ -226,6 +230,9 @@ int main(int argc, char **argv)
                get_output_name(outfname, sizeof(outfname), input, ".s");
 
                translation_unit_t *unit = do_parsing(input);
+               if(unit == NULL) {
+                       return 1;
+               }
                create_firm_prog(unit);
                emit(input, outfname);
                link(outfname, "a.out");