[Bug translator/16097] improve error message on array type mismatch

jlebon at redhat dot com sourceware-bugzilla@sourceware.org
Mon Oct 28 22:08:00 GMT 2013


https://sourceware.org/bugzilla/show_bug.cgi?id=16097

--- Comment #1 from Jonathan Lebon <jlebon at redhat dot com> ---
Note by the way, that if we don't use a function, then the right tokens are
printed out:

$ stap -p2 -e '

global array

probe begin {            
   array[0] = 1
   array[1] = "string" 
}                           
'                           
semantic error: type mismatch (string vs. long): identifier 'array' at
<input>:7:4
        source:    array[1] = "string"
                   ^

semantic error: type was first inferred here (long): identifier 'array' at :6:4
        source:    array[0] = 1
                   ^

Pass 2: analysis failed.  [man error::pass2]

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Systemtap mailing list