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 r13-1631] [Ada] Fix spurious warning on unreferenced internal generic instance
Date: Tue, 12 Jul 2022 12:26:07 +0000 (GMT)	[thread overview]
Message-ID: <20220712122607.43A723815595@sourceware.org> (raw)

https://gcc.gnu.org/g:4fc09105aa018aec5645e7b2e8d00bef9e2e620e

commit r13-1631-g4fc09105aa018aec5645e7b2e8d00bef9e2e620e
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Jun 27 13:09:10 2022 +0200

    [Ada] Fix spurious warning on unreferenced internal generic instance
    
    This patch removes a spurious warning, saying that an internal entity of
    a generic formal package is unreferenced. The immediate cause of this
    warning is that the internal entity is explicitly flagged as coming from
    source.
    
    The explicit flagging was added decades ago to fix a missing
    cross-reference in the ALI file. Apparently these days the
    cross-references work fine without this flag.
    
    gcc/ada/
    
            * sem_ch12.adb (Analyze_Package_Instantiation): Remove dubious
            call to Set_Comes_From_Source.

Diff:
---
 gcc/ada/sem_ch12.adb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index af8bbbe2f9e..c980d7bb0ce 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -4297,7 +4297,6 @@ package body Sem_Ch12 is
 
       if Nkind (N) = N_Package_Instantiation then
          Act_Decl_Id := New_Copy (Defining_Entity (N));
-         Set_Comes_From_Source (Act_Decl_Id, True);
 
          if Nkind (Defining_Unit_Name (N)) = N_Defining_Program_Unit_Name then
             Act_Decl_Name :=


                 reply	other threads:[~2022-07-12 12:26 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=20220712122607.43A723815595@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: link
Be 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).