This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Simplify call to Unique_Defining_Entity on protected entry declarations
- From: Pierre-Marie de Rodat <derodat at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Piotr Trojanek <trojanek at adacore dot com>
- Date: Thu, 31 May 2018 06:48:43 -0400
- Subject: [Ada] Simplify call to Unique_Defining_Entity on protected entry declarations
Calling Unique_Defining_Entity on protectected entry declarations is
equivalent to calling a simpler Defining_Entity; use the simpler routine.
Simplification only; semantics unaffected, so no test provided.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-05-31 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
with a semantically equivalent call to Defining_Entity.
--- gcc/ada/sem_prag.adb
+++ gcc/ada/sem_prag.adb
@@ -18795,7 +18795,7 @@ package body Sem_Prag is
return;
end if;
- Entry_Id := Unique_Defining_Entity (Entry_Decl);
+ Entry_Id := Defining_Entity (Entry_Decl);
-- Otherwise the pragma is associated with an illegal construct