From: David Malcolm <dmalcolm@redhat.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: jit@gcc.gnu.org
Subject: Re: The output of gcc_jit_context_dump_to_file() is missing parenthesis in expressions involving casts
Date: Thu, 01 Jan 2015 00:00:00 -0000 [thread overview]
Message-ID: <1434478939.14663.42.camel@surprise> (raw)
In-Reply-To: <1434478556.14663.39.camel@surprise>
On Tue, 2015-06-16 at 14:15 -0400, David Malcolm wrote:
> On Sun, 2015-06-14 at 20:42 -0400, David Malcolm wrote:
> > On Sun, 2015-06-14 at 20:11 +0100, Dibyendu Majumdar wrote:
> > > It seems that in some cases the output is not showing parenthesis
> > > where it should.
> >
> > Yes, this is a bug.
> >
> > The dumping fns are somewhat hacky; they have no concept of C precedence
> > order, and are probably misleading on some expressions. Sorry.
> >
> > I've filed it as:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66539
>
> (snip)
>
> This should be fixed now for gcc trunk (for GCC 6) as of r224531;
> gcc_jit_get_debug_string should now add parentheses where needed,
> mimicking C's precedence order.
FWIW, in particular, my testcase for the debug string of a chain of
derefs with a cast inside them emits this:
"((struct node *)ptr->next)->next"
(see gcc/testsuite/jit.dg/test-debug-strings.c).
> If after updating to r224531 you still see any expressions where it gets
> it wrong, please let me know.
>
> Dave
>
prev parent reply other threads:[~2015-06-16 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 0:00 Dibyendu Majumdar
2015-01-01 0:00 ` David Malcolm
2015-01-01 0:00 ` [PATCH, committed] PR jit/66539: Add parentheses as needed to gcc_jit_object_get_debug_string David Malcolm
2015-01-01 0:00 ` The output of gcc_jit_context_dump_to_file() is missing parenthesis in expressions involving casts David Malcolm
2015-01-01 0:00 ` David Malcolm [this message]
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=1434478939.14663.42.camel@surprise \
--to=dmalcolm@redhat.com \
--cc=jit@gcc.gnu.org \
--cc=mobile@majumdar.org.uk \
/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).