public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1626] [Ada] Warn about overlapping actuals in all versions of Ada Date: Fri, 18 Jun 2021 08:38:55 +0000 (GMT) [thread overview] Message-ID: <20210618083855.C716E39B4413@sourceware.org> (raw) https://gcc.gnu.org/g:1be46d12a7b76e62f25f3e4e148cda3a6c8948c3 commit r12-1626-g1be46d12a7b76e62f25f3e4e148cda3a6c8948c3 Author: Piotr Trojanek <trojanek@adacore.com> Date: Wed Mar 17 13:36:50 2021 +0100 [Ada] Warn about overlapping actuals in all versions of Ada gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Cleanup conditions related to Ada_Version. Diff: --- gcc/ada/sem_warn.adb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index 4ec96fc3c9d..23f27711b5a 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -3725,11 +3725,6 @@ package body Sem_Warn is -- Start of processing for Warn_On_Overlapping_Actuals begin - - if Ada_Version < Ada_2012 and then not Warn_On_Overlap then - return; - end if; - -- Exclude calls rewritten as enumeration literals if Nkind (N) not in N_Subprogram_Call | N_Entry_Call_Statement then @@ -3823,14 +3818,13 @@ package body Sem_Warn is then null; - -- Under Ada 2012 we only report warnings on overlapping - -- arrays and record types if switch is set. + -- We only report warnings on overlapping arrays and record + -- types if switch is set. - elsif Ada_Version >= Ada_2012 + elsif not Warn_On_Overlap and then not (Is_Elementary_Type (Etype (Form1)) and then Is_Elementary_Type (Etype (Form2))) - and then not Warn_On_Overlap then null; @@ -3844,7 +3838,7 @@ package body Sem_Warn is Ada_Version < Ada_2012 - -- Overlap is only illegal in Ada 2012 in the case of + -- Overlap is only illegal since Ada 2012 and only for -- elementary types (passed by copy). For other types -- we always have a warning in all versions. This is -- clarified by AI12-0216.
reply other threads:[~2021-06-18 8:38 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=20210618083855.C716E39B4413@sourceware.org \ --to=pmderodat@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).