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,7 +204,10 @@ void fstk_RunInclude(char const *path)
if (!fstk_FindFile(path, &fullPath, &size)) {
free(fullPath);
error("Unable to open included file '%s': %s\n", path, strerror(errno));
if (oGeneratedMissingIncludes)
oFailedOnMissingInclude = true;
else
error("Unable to open included file '%s': %s\n", path, strerror(errno));
return;
}
dbgPrint("Full path: \"%s\"\n", fullPath);

View File

@@ -78,7 +78,7 @@ void sym_ForEach(void (*func)(struct Symbol *, void *), void *arg)
static int32_t Callback_NARG(void)
{
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 macro_NbArgs();