public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: "Franथईois-Xavier Coudert" <fxcoudert@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6126] Fortran: fix use of static_assert() to conform to C11 Date: Mon, 27 Dec 2021 21:00:57 +0000 (GMT) [thread overview] Message-ID: <20211227210057.1910F3858404@sourceware.org> (raw) 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;
reply other threads:[~2021-12-27 21:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211227210057.1910F3858404@sourceware.org \ --to=fxcoudert@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).