public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1386] ada: Make use of Cannot_Be_Superflat flag on N_Range nodes Date: Tue, 30 May 2023 07:18:40 +0000 (GMT) [thread overview] Message-ID: <20230530071840.C62C138560A4@sourceware.org> (raw) https://gcc.gnu.org/g:a91b145bd6903aa526de8f5c7b1586045b574e31 commit r14-1386-ga91b145bd6903aa526de8f5c7b1586045b574e31 Author: Eric Botcazou <ebotcazou@adacore.com> Date: Thu Jan 19 00:37:18 2023 +0100 ada: Make use of Cannot_Be_Superflat flag on N_Range nodes gcc/ada/ * gcc-interface/decl.cc (range_cannot_be_superflat): Return true immediately if Cannot_Be_Superflat is set. * gcc-interface/misc.cc (gnat_post_options): Do not override the -Wstringop-overflow setting. Diff: --- gcc/ada/gcc-interface/decl.cc | 4 ++++ gcc/ada/gcc-interface/misc.cc | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index ec61593a65b..53a11243590 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -6673,6 +6673,10 @@ range_cannot_be_superflat (Node_Id gnat_range) Node_Id gnat_scalar_range; tree gnu_lb, gnu_hb, gnu_lb_minus_one; + /* This is the easy case. */ + if (Cannot_Be_Superflat (gnat_range)) + return true; + /* If the low bound is not constant, take the worst case by finding an upper bound for its type, repeatedly if need be. */ while (Nkind (gnat_lb) != N_Integer_Literal diff --git a/gcc/ada/gcc-interface/misc.cc b/gcc/ada/gcc-interface/misc.cc index b18ca8c7d88..56c7bb9b533 100644 --- a/gcc/ada/gcc-interface/misc.cc +++ b/gcc/ada/gcc-interface/misc.cc @@ -267,9 +267,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) /* No return type warnings for Ada. */ warn_return_type = 0; - /* No string overflow warnings for Ada. */ - warn_stringop_overflow = 0; - /* No caret by default for Ada. */ if (!OPTION_SET_P (flag_diagnostics_show_caret)) global_dc->show_caret = false;
reply other threads:[~2023-05-30 7:18 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=20230530071840.C62C138560A4@sourceware.org \ --to=dkm@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).