public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6126] Fortran: fix use of static_assert() to conform to C11
@ 2021-12-27 21:00 Franथईois-Xavier Coudert
  0 siblings, 0 replies; only message in thread
From: Franथईois-Xavier Coudert @ 2021-12-27 21:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3430132f3e8289f1b789a1a91206c44c47fb032c

commit r12-6126-g3430132f3e8289f1b789a1a91206c44c47fb032c
Author: Francois-Xavier Coudert <fxcoudert@gmail.com>
Date:   Mon Dec 27 21:32:08 2021 +0100

    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().

Diff:
---
 libgfortran/runtime/string.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libgfortran/runtime/string.c b/libgfortran/runtime/string.c
index 0ccd731852a..21585f48dc9 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-27 21:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 21:00 [gcc r12-6126] Fortran: fix use of static_assert() to conform to C11 Franथईois-Xavier Coudert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).