diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-09-16 19:53:50 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-09-16 19:53:50 -0700 |
commit | 31a86a186874fc6425195342c7bebb8080bacdbc (patch) | |
tree | a515ed7ac4ea47a6608fb5e2910acd07e0e0be42 | |
parent | 0275aa00f6862738d152a7a46ddfa709fee15278 (diff) | |
download | txr-31a86a186874fc6425195342c7bebb8080bacdbc.tar.gz txr-31a86a186874fc6425195342c7bebb8080bacdbc.tar.bz2 txr-31a86a186874fc6425195342c7bebb8080bacdbc.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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |