[compiler-rt] f8b497e - [compiler-rt] Work around a warning from -Wgnu-anonymous-struct (#120314)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 19:51:23 PST 2024


Author: Kazu Hirata
Date: 2024-12-17T19:51:20-08:00
New Revision: f8b497ef611ba622970aae26d5e7afc13e92a3d4

URL: https://github.com/llvm/llvm-project/commit/f8b497ef611ba622970aae26d5e7afc13e92a3d4
DIFF: https://github.com/llvm/llvm-project/commit/f8b497ef611ba622970aae26d5e7afc13e92a3d4.diff

LOG: [compiler-rt] Work around a warning from -Wgnu-anonymous-struct (#120314)

This patch works around:


compiler-rt/lib/tysan/../sanitizer_common/sanitizer_platform_limits_posix.h:604:3:
  error: anonymous structs are a GNU extension
  [-Werror,-Wgnu-anonymous-struct]

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index cacbb5b9959e0a..ea0933ca64af1d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -601,7 +601,7 @@ struct __sanitizer_siginfo_pad {
 #if SANITIZER_LINUX
 # define SANITIZER_HAS_SIGINFO 1
 union __sanitizer_siginfo {
-  struct {
+  __extension__ struct {
     int si_signo;
 # if SANITIZER_MIPS
     int si_code;


        


More information about the llvm-commits mailing list