Skip to content

Instantly share code, notes, and snippets.

@kerneltoast
Last active December 16, 2020 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kerneltoast/8397c41e1b8511542b0752434a0e438f to your computer and use it in GitHub Desktop.
Save kerneltoast/8397c41e1b8511542b0752434a0e438f to your computer and use it in GitHub Desktop.
semantic error: type mismatch (string): identifier 'a' at test.stp:13:7
source: f(a);
^
semantic error: type mismatch (string): identifier 'a' at :13:7
source: f(a);
^
semantic error: type was first inferred here (long): identifier 'a' at :12:7
source: g(a);
^
Pass 2: analysis failed. [man error::pass2]
--- a/session.cxx
+++ b/session.cxx
@@ -2382,6 +2382,7 @@ systemtap_session::print_error (const semantic_error& se)
if (verbose > 0 || seen_errors[se.errsrc_chain()] < 1)
{
seen_errors[se.errsrc_chain()]++;
+ cerr << build_error_msg(se);
for (const semantic_error *e = &se; e != NULL; e = e->get_chain())
if (verbose > 1 || seen_errors[e->errsrc] < 1) // dupe-eliminate chained errors too
{
semantic error: type mismatch (string): identifier 'a' at test.stp:13:7
source: f(a);
^
semantic error: type was first inferred here (long): identifier 'a' at :12:7
source: g(a);
^
Pass 2: analysis failed. [man error::pass2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment