aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gmail.com>2021-12-27 21:32:08 +0100
committerFrancois-Xavier Coudert <fxcoudert@gmail.com>2021-12-27 21:32:08 +0100
commit3430132f3e8289f1b789a1a91206c44c47fb032c (patch)
tree38c5736f1648dc475083cb8614142b4d7b075700
parentea8b5640551ee7cbecf5c3ce30f0268963de3039 (diff)
downloadgcc-3430132f3e8289f1b789a1a91206c44c47fb032c.zip
gcc-3430132f3e8289f1b789a1a91206c44c47fb032c.tar.gz
gcc-3430132f3e8289f1b789a1a91206c44c47fb032c.tar.bz2
Fortran: fix use of static_assert() to conform to C11
libgfortran/ChangeLog: PR libfortran/98076 * runtime/string.c (gfc_itoa): Use two args for static_assert().
-rw-r--r--libgfortran/runtime/string.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgfortran/runtime/string.c b/libgfortran/runtime/string.c
index 0ccd731..21585f4 100644
--- a/libgfortran/runtime/string.c
+++ b/libgfortran/runtime/string.c
@@ -242,7 +242,8 @@ gfc_itoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len)
integers (we would need three calls), but they do suffice for all
values up to 2^127, which is the largest that Fortran can produce
(-HUGE(0_16)-1) with its signed integer types. */
- static_assert(sizeof(GFC_UINTEGER_LARGEST) <= 2 * sizeof(uint64_t));
+ static_assert(sizeof(GFC_UINTEGER_LARGEST) <= 2 * sizeof(uint64_t),
+ "integer too large");
GFC_UINTEGER_LARGEST r;
r = n % TEN19;