This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug jit/71334] gccjit's sized integers have different underlying types than stdint.h


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71334

--- Comment #3 from Ben Longbons <b.r.longbons at gmail dot com> ---
What I'm trying to do is:

* parse some source code from a new language I'm developing.
* Emit that to machine code via some backend (C, GCCJIT, LLVM, firm, etc.)
* Also emit a header file so that the library is callable from C code.

Doing this requires knowing what the underlying type was, in order to have
compatible function declarations. In future I suspect it will also be useful
for C++-compatible mangling, which is also used for
__attribute__((overloaded)).

Functions to get the size/align of any given primitive type would also be very
useful.

Dealing with all the edge-cases with cross-compiling is hard, especially when
the target supports multilib ... even if target-gcc exists, it might not be the
same version, and in general (if the preprocessor doesn't have a way to emit
that info) you can only get 1 bit of information out per fork+exec.

Enumerating possible target info is already way too hard in general, e.g. I
can't even find a way to get the current -m32 or -mx32 target names ... with
clang at least I can inspect the output of `clang -m32 -x c - -S -emit-llvm -o
- <<< ''`

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]