From: Frank Ch. Eigler Date: Fri, 9 Sep 2016 13:43:03 +0000 (-0400) Subject: PR20423: tweak error message generation for case without e->components[] X-Git-Tag: release-3.1~605 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=423bb6990566e996dd81d6ac3904c00bbbdd2763;p=systemtap.git PR20423: tweak error message generation for case without e->components[] ... e.g. a case where a C function returns a struct, $return would trigger the "... is being accessed instead of member" message, but the operative tok* is the e node, not a member of the empty e->components[]. --- diff --git a/dwflpp.cxx b/dwflpp.cxx index bbeb4a6bf..92535cb2c 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -3711,7 +3711,9 @@ dwflpp::translate_final_fetch_or_store (struct obstack *pool, type_name.c_str(), decl_source.c_str(), a_member.c_str()), - e->components[e->components.size()-1].tok); + (e->components.size() > 0 ? + (e->components[e->components.size()-1].tok) : + (e->tok))); } break;