The output of gcc_jit_context_dump_to_file() is missing parenthesis in expressions involving casts

David Malcolm dmalcolm@redhat.com
Thu Jan 1 00:00:00 GMT 2015


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. 

If after updating to r224531 you still see any expressions where it gets
it wrong, please let me know.

Dave



More information about the Jit mailing list