Hi Dave,

thanks for the review!

David Malcolm <dmalc...@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 via email to