On Fri, 2024-12-13 at 11:24 +0100, Basile Starynkevitch wrote:
> On Fri, 2024-12-13 at 11:03 +0100, Basile Starynkevitch wrote:
> > Hello all,
> > 
> > On GNU Linux/Ubuntu/x86_64 I am using libgccjit++ (in
> > https://github.com/RefPerSys/RefPerSys/ - a GPLv3+ inference engine
> > project) but I cannot understand how to create in C++ a union type.
> > 
> > 
> > Today (Dec 13, 2024) the file
> > https://gcc.gnu.org/onlinedocs/jit/cp/topics/types.html
> > don't explain how to create a GCCJIT union type.
> > 
> > Is there a simple C++ example creating a union for libgccjit 14?
> > 
> > Thanks
> > 
> 
> It seems that gcc_jit_context_new_union_type exists as a C callable
> function in /usr/lib/gcc/x86_64-linux-gnu/14/include/libgccjit.h but
> has not yet a C++ wrapping function?

That's quite likely.  I wrote libgccjit++.h a decade ago for a
particular project that I've abandoned [1], and it's become something
of a second-class part of libgccjit as the C API has moved forward -
sorry.

I don't know of anyone else using libgccjit++.h, so you're likely to
run into gaps like this - but any fixes would (I hope) be relatively
simple, if you don't mind working on patches for libgccjit++.h.

Dave

[1] https://savannah.gnu.org/patch/index.php?8395 (a port of GNU
Octave's JIT compiler to libgccjit)

Reply via email to