File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Open diff view settings
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -5298,18 +5298,19 @@ void codegen_translate_c(CodeGen *g, Buf *full_path) {
52985298
52995299 ZigList<ErrorMsg *> errors = {0 };
53005300 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- }
53055301
5306- if (errors.length > 0 ) {
5302+ if (err == ErrorCCompileErrors && errors.length > 0 ) {
53075303 for (size_t i = 0 ; i < errors.length ; i += 1 ) {
53085304 ErrorMsg *err_msg = errors.at (i);
53095305 print_err_msg (err_msg, g->err_color );
53105306 }
53115307 exit (1 );
53125308 }
5309+
5310+ if (err) {
5311+ fprintf (stderr, " unable to parse C file: %s\n " , err_str (err));
5312+ exit (1 );
5313+ }
53135314}
53145315
53155316static ImportTableEntry *add_special_code (CodeGen *g, PackageTableEntry *package, const char *basename) {
You can’t perform that action at this time.
0 commit comments