From: "fche at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/12586] New: better treatment for confusing $var . field vs. $var->field syntax
Date: Tue, 15 Mar 2011 16:52:00 -0000 [thread overview]
Message-ID: <bug-12586-6586@http.sourceware.org/bugzilla/> (raw)
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.
reply other threads:[~2011-03-15 16:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-12586-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).