diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2022-10-05 01:01:50 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2022-10-05 01:20:07 +0530 |
commit | 219cbccb9ac1d25df5534b60c0c6a6071b2303ed (patch) | |
tree | a052c340475ed6599698076c4e5f31de48c20f88 /src/comp.c | |
parent | df5cb9b2a35f33f02a00bcba8e6e044cb7fe737d (diff) | |
download | emacs-219cbccb9ac1d25df5534b60c0c6a6071b2303ed.tar.gz |
Add comment explaining gcc_jit_context_new_bitcast usage.
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c index 794501f11b0..b7541c5d9f7 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1179,6 +1179,11 @@ emit_coerce (gcc_jit_type *new_type, gcc_jit_rvalue *obj) gcc_jit_rvalue *tmp = obj; + /* `gcc_jit_context_new_bitcast` requires that the types being converted + between have the same layout and as such, doesn't allow converting + between an arbitrarily sized integer/boolean and a pointer. Casting it + to a uintptr/void* is still necessary, to ensure that it can be bitcast + into a (void *)/uintptr respectively. */ if (old_is_ptr != new_is_ptr) { if (old_is_ptr) |