Implement -Wunmatched-directive

This commit is contained in:
Rangi42
2024-11-28 14:06:52 -05:00
committed by Eldred Habert
parent 9216485bca
commit a27f704c25
15 changed files with 51 additions and 0 deletions

View File

@@ -973,6 +973,12 @@ void sect_PopSection() {
std::swap(currentUnionStack, entry.unionStack);
}
void sect_CheckStack() {
if (!sectionStack.empty()) {
warning(WARNING_UNMATCHED_DIRECTIVE, "`PUSHS` without corresponding `POPS`\n");
}
}
void sect_EndSection() {
if (!currentSection)
fatalerror("Cannot end the section outside of a SECTION\n");