| ... | ... | @@ -5298,18 +5298,19 @@ void codegen_translate_c(CodeGen *g, Buf *full_path) { |
| 5298 | 5298 | |
| 5299 | 5299 | ZigList<ErrorMsg *> errors = {0}; |
| 5300 | 5300 | int err = parse_h_file(import, &errors, buf_ptr(full_path), g, nullptr); |
| 5301 | | if (err) { |
| 5302 | | fprintf(stderr, "unable to parse C file: %s\n", err_str(err)); |
| 5303 | | exit(1); |
| 5304 | | } |
| 5305 | 5301 | |
| 5306 | | if (errors.length > 0) { |
| 5302 | if (err == ErrorCCompileErrors && errors.length > 0) { |
| 5307 | 5303 | for (size_t i = 0; i < errors.length; i += 1) { |
| 5308 | 5304 | ErrorMsg *err_msg = errors.at(i); |
| 5309 | 5305 | print_err_msg(err_msg, g->err_color); |
| 5310 | 5306 | } |
| 5311 | 5307 | exit(1); |
| 5312 | 5308 | } |
| 5309 | |
| 5310 | if (err) { |
| 5311 | fprintf(stderr, "unable to parse C file: %s\n", err_str(err)); |
| 5312 | exit(1); |
| 5313 | } |
| 5313 | 5314 | } |
| 5314 | 5315 | |
| 5315 | 5316 | static ImportTableEntry *add_special_code(CodeGen *g, PackageTableEntry *package, const char *basename) { |