mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Store IF depth relative to each fstack context
This disallows starting/ending an IF inside an INCLUDEd file or a macro expansion
This commit is contained in:
@@ -46,7 +46,7 @@ const size_t cldefine_entrysize = 2 * sizeof(void *);
|
||||
char **cldefines;
|
||||
|
||||
clock_t nStartClock, nEndClock;
|
||||
uint32_t nTotalLines, nIFDepth;
|
||||
uint32_t nTotalLines;
|
||||
|
||||
#if defined(YYDEBUG) && YYDEBUG
|
||||
extern int yydebug;
|
||||
@@ -488,7 +488,6 @@ int main(int argc, char *argv[])
|
||||
nStartClock = clock();
|
||||
|
||||
nTotalLines = 0;
|
||||
nIFDepth = 0;
|
||||
sym_Init(now);
|
||||
sym_SetExportAll(exportall);
|
||||
|
||||
@@ -502,10 +501,6 @@ int main(int argc, char *argv[])
|
||||
if (dependfile)
|
||||
fclose(dependfile);
|
||||
|
||||
if (nIFDepth != 0)
|
||||
errx(1, "Unterminated IF construct (%" PRIu32 " levels)!",
|
||||
nIFDepth);
|
||||
|
||||
sect_CheckUnionClosed();
|
||||
|
||||
double timespent;
|
||||
|
||||
Reference in New Issue
Block a user