diff --git a/src/cc/main.cpp b/src/cc/main.cpp index 3c1840a5..3945ceee 100644 --- a/src/cc/main.cpp +++ b/src/cc/main.cpp @@ -88,16 +88,17 @@ int main(int argc, char *argv[]) cerr << "BUG: ANTLR syntax error. mayhapes C version newer than C11?" << endl; return 1; } + + if (!keep_intermediate) + { + filesystem::remove(intermediate.replace_extension(".i")); + } if (args->get("--dump-ast")) { cout << tree->toStringTree(&parser, true) << endl; return 0; } - if (!keep_intermediate) - { - filesystem::remove(intermediate.replace_extension(".i")); - } std::ofstream output(intermediate.replace_extension(".s")); Analyzer analyzer;