This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/16097] New: improve error message on array type mismatch
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 28 Oct 2013 20:49:44 +0000
- Subject: [Bug translator/16097] New: improve error message on array type mismatch
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16097
Bug ID: 16097
Summary: improve error message on array type mismatch
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: jlebon at redhat dot com
Run the following:
$ stap -p2 -e '
global array
function str_ret_type() {
return "hi"
}
probe begin {
array[0] = 1
array[1] = str_ret_type()
}
'
And you'll get as errors:
semantic error: type mismatch (long vs. string): identifier 'array' at
<input>:3:8
source: global array
^
semantic error: type was first inferred here (string): identifier 'array' at
:10:4
source: array[0] = 1
^
Pass 2: analysis failed. [man error::pass2]
It seems strange to point out the array declaration as the place of the
mismatch. It would be more helpful if it mentioned the array[1] line instead,
where the real mismatch happens.
--
You are receiving this mail because:
You are the assignee for the bug.