warn for int const / int const. this will probably want an option for newer
	games
qfcc.c:
	clean up temp files when errors have occured
This commit is contained in:
Bill Currie 2001-07-24 04:45:53 +00:00
parent 75f3f27a22
commit 6d1671950a
2 changed files with 6 additions and 3 deletions

View file

@ -135,7 +135,7 @@ warning (expr_t *e, const char *fmt, ...)
file = e->file;
line = e->line;
}
fprintf (stderr, "%s:%d: warning:", strings + file, line);
fprintf (stderr, "%s:%d: warning: ", strings + file, line);
vfprintf (stderr, fmt, args);
fputs ("\n", stderr);
va_end (args);
@ -519,6 +519,7 @@ do_op_integer (int op, expr_t *e1, expr_t *e2)
e1->e.integer_val *= i2;
break;
case '/':
warning (e2, "%d / %d == %d", i1, i2, i1 / i2);
e1->e.integer_val /= i2;
break;
case '&':

View file

@ -1026,6 +1026,7 @@ Options: \n\
char tempname[1024];
int tempfd;
#endif
int error;
extern FILE *yyin;
int yyparse(void);
extern void clear_frame_macros (void);
@ -1096,8 +1097,7 @@ Options: \n\
s_file = ReuseString (filename);
pr_source_line = 1;
clear_frame_macros ();
if (yyparse () || pr_error_count)
return 1;
error = yyparse () || pr_error_count;
fclose (yyin);
#ifdef USE_CPP
if (!no_cpp) {
@ -1107,6 +1107,8 @@ Options: \n\
}
}
#endif
if (error)
return 1;
#else
char *src2;
sprintf (filename, "%s%c%s", sourcedir, PATH_SEPARATOR, com_token);