summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-09-16 19:53:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-09-16 19:53:50 -0700
commit90f4312512bdc94888cf50b6f8196a97dcb80ae7 (patch)
treea515ed7ac4ea47a6608fb5e2910acd07e0e0be42
parentbaeec016eb532fb39c05bf888aa2047cb714016f (diff)
downloadtxr-90f4312512bdc94888cf50b6f8196a97dcb80ae7.tar.gz
txr-90f4312512bdc94888cf50b6f8196a97dcb80ae7.tar.bz2
txr-90f4312512bdc94888cf50b6f8196a97dcb80ae7.zip
nan-boxing: warning fix for gcc 12.
gcc 12.2.0, targetting RISC-V, emitted a warning for the c_f function that the &u expression uses an uninitialized u, even though u is declared with an initializer. Code builds otherwise and tests pass. * lib.h (c_f): Also suppress and re-enable the -Wuninitialized option.
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index c15e1ff5..dc12c355 100644
--- a/lib.h
+++ b/lib.h
@@ -623,6 +623,7 @@ INLINE ucnum c_u(val num)
#if CONFIG_NAN_BOXING && defined __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
INLINE double c_f(val num)
@@ -637,6 +638,7 @@ INLINE double c_f(val num)
#if CONFIG_NAN_BOXING && defined __GNUC__
#pragma GCC diagnostic warning "-Wstrict-aliasing"
+#pragma GCC diagnostic warning "-Wuninitialized"
#endif
#if SIZEOF_WCHAR_T < 4 && !CONFIG_NAN_BOXING