From c23f970a5f60d943f2bbc4ea493c407a17e84c17 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 15 Feb 2016 16:54:06 +0100 Subject: [PATCH] vhdlpp: Do not display an error message when probing type without a context. --- vhdlpp/expression_elaborate.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vhdlpp/expression_elaborate.cc b/vhdlpp/expression_elaborate.cc index e11a5e328..7888f162a 100644 --- a/vhdlpp/expression_elaborate.cc +++ b/vhdlpp/expression_elaborate.cc @@ -1020,8 +1020,14 @@ const VType* ExpName::probe_type(Entity*ent, ScopeBase*scope) const } } - cerr << get_fileline() << ": error: Signal/variable " << name_ - << " not found in this context." << endl; + if(ent || scope) { + // Do not display error messages if there was no entity or scope + // specified. There are functions that are called without any specific + // context and they still may want to probe the expression type. + cerr << get_fileline() << ": error: Signal/variable " << name_ + << " not found in this context." << endl; + } + return 0; }