From 9cb506ad971ce7b37fa80e8d58c579bcb2cc2342 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Mon, 4 Jan 2021 13:39:22 -0800 Subject: [PATCH] simple error propagation fix: don't complain about "unused" values that themselves are due to errors --- src/Stmt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stmt.cc b/src/Stmt.cc index d2b554f439..87860c4ebe 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -311,7 +311,7 @@ ValPtr PrintStmt::DoExec(std::vector vals, ExprStmt::ExprStmt(ExprPtr arg_e) : Stmt(STMT_EXPR), e(std::move(arg_e)) { - if ( e && e->IsPure() ) + if ( e && e->IsPure() && e->GetType()->Tag() != TYPE_ERROR ) Warn("expression value ignored"); SetLocationInfo(e->GetLocationInfo());