GCCJIT dynamic down casting (GCC16 or future GCC17)

Basile STARYNKEVITCH <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <[email protected]>
Hello all,

I do have (and even compiled it from source code a few days ago) GCC 16
with libgccjit enabled (this on Linux/x86-64).

gcc-16 (Debian 16-20260425-1) 16.0.1 20260425 (prerelease) [gcc-16 r16-
8812-gd9c07462a22]

https://gcc.gnu.org/onlinedocs/jit/topics/objects.html
mentions upcasting 
> casting methods for upcasting from subclasses to parent classes

But is there any dynamic downcasting (or way to dynamically query the
GCCJIT "class" of any gcc_jit_object pointer)?

E.g. suppose I have some gcc_jit_object* jp pointer.

How can I know if jp is representing a struct, a left value, a field, a
parameter, a number constant etc....




I am serializing GCCJIT representation to JSON in my open source
RefPerSys software, its commit 94d149cbaa71 

Thanks for your insights

-- 

Basile STARYNKEVITCH                           
<[email protected]>
8 rue de la Faïencerie                      
http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine                        
https://github.com/bstarynk
France                               
https://github.com/RefPerSys/RefPerSys
                  https://orcid.org/0000-0003-0908-5250
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.