diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-02-01 21:07:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-02-01 21:10:10 +0100 |
commit | e9b2f15d989addc1c2ad4604f5fa5ee1bda6023b (patch) | |
tree | 1178558d6d9ad46f96ec7bf15aec2c7ce74817c7 /libgcc/libgcc2.h | |
parent | 03519175e21f4c2940aeb446cd2b81fdf995cad5 (diff) | |
download | gcc-e9b2f15d989addc1c2ad4604f5fa5ee1bda6023b.zip gcc-e9b2f15d989addc1c2ad4604f5fa5ee1bda6023b.tar.gz gcc-e9b2f15d989addc1c2ad4604f5fa5ee1bda6023b.tar.bz2 |
libgcc: Avoid warnings on __gcc_nested_func_ptr_created [PR113402]
I'm seeing hundreds of
In file included from ../../../libgcc/libgcc2.c:56:
../../../libgcc/libgcc2.h:32:13: warning: conflicting types for built-in function ‘__gcc_nested_func_ptr_created’; expected ‘void(void *, void *, void *)’
+[-Wbuiltin-declaration-mismatch]
32 | extern void __gcc_nested_func_ptr_created (void *, void *, void **);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warnings.
Either we need to add like in r14-6218
#pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
(but in that case because of the libgcc2.h prototype (why is it there?)
it would need to be also with #pragma GCC diagnostic push/pop around),
or we could go with just following how the builtins are prototyped on the
compiler side and only cast to void ** when dereferencing (which is in
a single spot in each TU).
2024-02-01 Jakub Jelinek <jakub@redhat.com>
PR libgcc/113402
* libgcc2.h (__gcc_nested_func_ptr_created): Change type of last
argument from void ** to void *.
* config/i386/heap-trampoline.c (__gcc_nested_func_ptr_created):
Change type of dst from void ** to void * and cast dst to void **
before dereferencing it.
* config/aarch64/heap-trampoline.c (__gcc_nested_func_ptr_created):
Likewise.
Diffstat (limited to 'libgcc/libgcc2.h')
-rw-r--r-- | libgcc/libgcc2.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/libgcc2.h b/libgcc/libgcc2.h index 0b67fab..b358b3a 100644 --- a/libgcc/libgcc2.h +++ b/libgcc/libgcc2.h @@ -29,7 +29,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #pragma GCC visibility push(default) #endif -extern void __gcc_nested_func_ptr_created (void *, void *, void **); +extern void __gcc_nested_func_ptr_created (void *, void *, void *); extern void __gcc_nested_func_ptr_deleted (void); extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t); |