Closed stanhu closed 9 months ago
Thanks for raising this, @stanhu. Am I right in thinking support for designated initialisers in C++ is a bit uncertain? Would we instead be better using the more "boring" form with only ordered expressions ala https://github.com/ruby/ruby/blob/60e19a0b5fc9c067ee88751192dc56da618f5060/weakmap.c#L151-L160?
For reference, here are the two versions of rb_data_type_t
we need to support:
@stanhu I've pushed a commit to switch away from designated initializers: can you please test this and let me know if it works with g++ 7.3.1?
Sounds good, thanks!
I've now published 2.4.3 to fix this. Please let me know if there are any other issues!
@byroot this issue and the two potential fixes (see the two commits) may be of interest to you if you’re trying to convert other C++ extensions from Data
to TypedData
.
Thanks for the ping, this is good to know. But hopefully there isn't too many of those around 😄
With g++ v7.3.1 (used with Amazon Linux 2), compiling the extension would fail with these errors:
This appears to be happening because the
parent
anddata
fields inrb_data_type_struct
were omitted.According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606, this issue was fixed in GCC 8.