public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrea Corallo <andrea.corallo@arm.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: jit@gcc.gnu.org,  nd@arm.com,  gcc-patches@gcc.gnu.org
Subject: Re: [PATCH V2] libgccjit: Add new gcc_jit_context_new_blob entry point
Date: Fri, 11 Sep 2020 12:31:39 +0200	[thread overview]
Message-ID: <gkrd02ssiyc.fsf@arm.com> (raw)
In-Reply-To: <faae39bd73fe42cec2e61c35dac2fabdeb210485.camel@redhat.com> (David Malcolm's message of "Thu, 10 Sep 2020 18:22:44 -0400")

Hi Dave,

thanks for the review!

David Malcolm <dmalcolm@redhat.com> writes:

[...]

> Was there a reason for using reinterpret_cast here, rather than
> static_cast?

Yes the reason is that apparently we can't use static_cast for that:

"error: invalid ‘static_cast’ from type ‘gcc_jit_lvalue*’ to type ‘gcc::jit::recording::global*’"

Why is that is another question I fear I'm not very qualified to answer.
If you feel is necessary and want to suggest some rework to improve this
I'll be happy to put some effort in if you like.

>> diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h
>> index 1c5a12e9c01..3cbcbef2693 100644
>> --- a/gcc/jit/libgccjit.h
>> +++ b/gcc/jit/libgccjit.h
>> @@ -788,6 +788,20 @@ gcc_jit_context_new_global (gcc_jit_context *ctxt,
>>  			    gcc_jit_type *type,
>>  			    const char *name);
>>  
>> +#define LIBGCCJIT_HAVE_gcc_jit_global_set_initializer
>> +
>> +/* Set a static initializer for a global return the global itself.

[...]

>
> OK for master with these nits fixed, assuming your usual testing.
>
> Thanks!
> Dave

After applying the suggestions and having tested it I've installed the
patch as 4ecc0061c40.

Thanks!

  Andrea

  reply	other threads:[~2020-09-11 10:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 10:11 [PATCH] " Andrea Corallo
2020-06-03 15:03 ` David Malcolm
2020-06-03 16:36   ` Andrea Corallo
2020-07-01 16:14     ` Andrea Corallo
2020-07-14 10:00       ` Andrea Corallo
2020-07-24 22:05       ` David Malcolm
2020-07-24 22:12         ` David Malcolm
2020-08-03  8:07           ` Andrea Corallo
2020-08-06 19:53             ` David Malcolm
2020-08-19  7:17               ` [PATCH V2] " Andrea Corallo
2020-09-09  7:51                 ` Andrea Corallo
2020-09-10 22:22                 ` David Malcolm
2020-09-11 10:31                   ` Andrea Corallo [this message]
2020-09-11 11:27                     ` David Malcolm

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=gkrd02ssiyc.fsf@arm.com \
    --to=andrea.corallo@arm.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    --cc=nd@arm.com \
    /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).