address clang 10 warnings

This commit is contained in:
Vern Paxson 2021-11-24 11:56:01 -08:00
parent e0b4659488
commit a830c269ab
2 changed files with 9 additions and 1 deletions

View file

@ -379,6 +379,13 @@ const ZAMStmt ZAMCompiler::GenCond(const Expr* e, int& branch_v)
else
branch_v = 2;
// clang 10 gets perturbed that the indentation of the "default" in the
// following switch block doesn't match that of the cases that we include
// from "ZAM-Conds.h". It really shouldn't worry about indentation mismatches
// across included files since those are not indicative of possible
// logic errors, but Oh Well.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
switch ( e->Tag() )
{
#include "ZAM-Conds.h"
@ -386,6 +393,7 @@ const ZAMStmt ZAMCompiler::GenCond(const Expr* e, int& branch_v)
default:
reporter->InternalError("bad expression type in ZAMCompiler::GenCond");
}
#pragma GCC diagnostic pop
// Not reached.
}