This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11504] Wrong location for inferred type conflict in error message
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 30 Apr 2010 18:00:21 -0000
- Subject: [Bug translator/11504] Wrong location for inferred type conflict in error message
- References: <20100416105207.11504.mjw@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From fche at redhat dot com 2010-04-30 18:00 -------
The typeresolution_info::mismatch routine, basing matches on the
token->content fields, seems too naive, and leads to junky stuff like:
stap -p2 -e 'probe begin { log(2 + "yo") }'
semantic error: probe_1971 uses invalid operator: operator '+' at <input>:1:21
source: probe begin { log(2 + "yo") }
^
semantic error: probe_1971 with type mismatch (string vs. long): string 'yo' at
:1:23
source: probe begin { log(2 + "yo") }
^
semantic error: probe_1971 with type mismatch (long vs. string): operator '+' at
:1:21
source: probe begin { log(2 + "yo") }
^
semantic error: probe_1971 type first inferred here (string): operator '+' at :1:21
source: probe begin { log(2 + "yo") }
^
semantic error: probe_1971 with type mismatch (long vs. string): identifier
'log' at :1:15
source: probe begin { log(2 + "yo") }
The core issue is that it is not tokens that get types, but expression objects.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11504
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.