/** use builtins for some libc functions */
bool use_builtins = false;
+/** we have extern function with const attribute. */
+bool have_const_functions = false;
+
/* to switch on printing of implicit casts */
extern bool print_implicit_casts;
default:
case 4:
set_option("strict-aliasing");
+ /* use_builtins = true; */
/* fallthrough */
case 3:
set_option("cond-eval");
set_option("if-conv");
- use_builtins = true;
/* fallthrough */
case 2:
set_option("inline");
if (streq(opt, "dollars-in-identifiers")) {
allow_dollar_in_symbol = truth_value;
+ } if (streq(opt, "builtins")) {
+ use_builtins = truth_value;
} else if (streq(opt, "short-wchar")) {
opt_short_wchar_t = truth_value;
} else if (streq(opt, "syntax-only")) {
/* preprocess and compile */
if (filetype == FILETYPE_PREPROCESSED_C) {
translation_unit_t *const unit = do_parsing(in, filename);
- if (in == preprocessed_in) {
- int pp_result = pclose(preprocessed_in);
- if (pp_result != EXIT_SUCCESS) {
- exit(EXIT_FAILURE);
- }
- }
/* prints the AST even if errors occurred */
if (mode == PrintAst) {
fprintf(stderr, "%u warning(s)\n", warning_count);
}
+ if (in == preprocessed_in) {
+ int pp_result = pclose(preprocessed_in);
+ if (pp_result != EXIT_SUCCESS) {
+ exit(EXIT_FAILURE);
+ }
+ }
+
if(mode == BenchmarkParser) {
return result;
} else if(mode == PrintFluffy) {
}
gen_firm_finish(asm_out, filename, /*c_mode=*/1,
- /*firm_const_exists=*/0);
+ have_const_functions);
if (asm_out != out) {
fclose(asm_out);
}