Fix INCLUDE ignoring -MG

This commit is contained in:
ISSOtm
2020-08-18 13:47:26 +02:00
parent 615f1072d9
commit e33c2ad6a2
2 changed files with 5 additions and 2 deletions

View File

@@ -204,6 +204,9 @@ void fstk_RunInclude(char const *path)
if (!fstk_FindFile(path, &fullPath, &size)) { if (!fstk_FindFile(path, &fullPath, &size)) {
free(fullPath); free(fullPath);
if (oGeneratedMissingIncludes)
oFailedOnMissingInclude = true;
else
error("Unable to open included file '%s': %s\n", path, strerror(errno)); error("Unable to open included file '%s': %s\n", path, strerror(errno));
return; return;
} }

View File

@@ -78,7 +78,7 @@ void sym_ForEach(void (*func)(struct Symbol *, void *), void *arg)
static int32_t Callback_NARG(void) static int32_t Callback_NARG(void)
{ {
if (!macro_GetCurrentArgs()) { if (!macro_GetCurrentArgs()) {
yyerror("_NARG does not make sense outside of a macro"); error("_NARG does not make sense outside of a macro\n");
return 0; return 0;
} }
return macro_NbArgs(); return macro_NbArgs();