diff --git a/src/script_opt/ZAM/Ops.in b/src/script_opt/ZAM/Ops.in index e1516bce99..d74cacc9d5 100644 --- a/src/script_opt/ZAM/Ops.in +++ b/src/script_opt/ZAM/Ops.in @@ -1099,7 +1099,7 @@ eval auto v = frame[z.v2].double_val; ZAM_run_time_error(z.loc, "underflow converting double to count"); break; } - if ( v > UINT64_MAX ) + if ( v > static_cast(UINT64_MAX) ) { ZAM_run_time_error(z.loc, "overflow converting double to count"); break; diff --git a/src/script_opt/ZAM/Stmt.cc b/src/script_opt/ZAM/Stmt.cc index 84ca6598aa..f6af240c95 100644 --- a/src/script_opt/ZAM/Stmt.cc +++ b/src/script_opt/ZAM/Stmt.cc @@ -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. }