This change improves the GTHREAD_ONCE_INIT initializer
exposed by gthr-vxworks.h to use a more standard syntax
for a zero-initialization, which fixes build failures
observed when activating libstdc++ builds for aarch64-vxworks.

Tested in accordance with the description in
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html

Committing to mainline.

Olivier

2019-12-13  Olivier Hainque  <hain...@adacore.com>

        * config/gthr-vxworks.h (GTHREAD_ONCE_INIT): Use
        standard zero-initializer syntax.

 libgcc/config/gthr-vxworks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index 3a30ce31088..2d2860a36dd 100644
--- a/libgcc/config/gthr-vxworks.h
+++ b/libgcc/config/gthr-vxworks.h
@@ -222,7 +222,7 @@ typedef struct
 #endif
 } __gthread_once_t;
 
-#define __GTHREAD_ONCE_INIT { 0 }
+#define __GTHREAD_ONCE_INIT {}
 
 extern int __gthread_once (__gthread_once_t *__once, void (*__func)(void));
 
-- 
2.17.1

Reply via email to