* [Bug translator/12586] New: better treatment for confusing $var . field vs. $var->field syntax
@ 2011-03-15 16:52 fche at redhat dot com
0 siblings, 0 replies; only message in thread
From: fche at redhat dot com @ 2011-03-15 16:52 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=12586
Summary: better treatment for confusing $var . field vs.
$var->field syntax
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap@sourceware.org
ReportedBy: fche@redhat.com
C programmers are sometimes confused by systemtap's use of -> for all
context-variable dereferencing, including for struct members. We should
try to improve this. Some possibilities, all to be conditional on
--compatible >= 1.5:
1) make the parser accept $var . foo and turn it into $var->foo
... but if $var is actually a string and foo is another string,
this would break the script. The parser doesn't have enough
information to decide.
2) make the parser warn for $var . foo
... we only have a few test cases for constructs like this, but it
can legitimately occur in $$parms . something
3) make the elaborator (pass-2) look for $var . foo; if the former fails
to resolve, try rewriting to $var->foo and resolve again.
4) something like 3), but only for non-string-valued $var
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-15 16:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 16:52 [Bug translator/12586] New: better treatment for confusing $var . field vs. $var->field syntax fche at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).