]> Savannah Git Hosting - gnulib.git/commitdiff
jit/cache tests: Avoid gcc -Wstrict-aliasing warning on Linux/powerpc64.
authorBruno Haible <bruno@clisp.org>
Wed, 10 Jan 2024 15:46:48 +0000 (16:46 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 10 Jan 2024 15:46:48 +0000 (16:46 +0100)
* tests/jit/test-cache.c (funcptr_to_structptr): Turn into an inline
function.

ChangeLog
tests/jit/test-cache.c

index 6187ed43a43051660721cecff194c970445f3a4f..9a585178f9026bdf04eb1458d69031ee2bb71a84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-10  Bruno Haible  <bruno@clisp.org>
+
+       jit/cache tests: Avoid gcc -Wstrict-aliasing warning on Linux/powerpc64.
+       * tests/jit/test-cache.c (funcptr_to_structptr): Turn into an inline
+       function.
+
 2024-01-10  Bruno Haible  <bruno@clisp.org>
 
        jit/cache tests: Fix for arm CPUs with GCC target arm-linux-gnueabihf.
index cad6d2a214447e691b23c0d9019d1b614d182914..18416f8f51ed08cd9ce31b3136f79f26f74a6f6b 100644 (file)
@@ -124,7 +124,11 @@ funcptr_to_structptr (void * volatile funcptr)
 }
 # else
 #  define structptr_to_funcptr(p) ((void *) (p))
-#  define funcptr_to_structptr(funcptr) ((struct func *) (funcptr))
+static inline struct func *
+funcptr_to_structptr (void * volatile funcptr)
+{
+  return (struct func *) funcptr;
+}
 # endif
 static inline struct func *
 xcopy_structptr (struct func *structptr)