public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2124] [Ada] Simplify code by reusing Remove on list of primitive operations
@ 2021-07-07 16:26 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-07 16:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e1eb4441733ca9b80faf4f51a29418d720014ae1
commit r12-2124-ge1eb4441733ca9b80faf4f51a29418d720014ae1
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Wed May 19 14:05:01 2021 +0200
[Ada] Simplify code by reusing Remove on list of primitive operations
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Simplify processing of pragma
CPP_Constructor.
Diff:
---
gcc/ada/sem_prag.adb | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 41e887d8f39..5705aa7bbf4 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -14738,7 +14738,6 @@ package body Sem_Prag is
-- [, [Link_Name =>] static_string_EXPRESSION ]);
when Pragma_CPP_Constructor => CPP_Constructor : declare
- Elmt : Elmt_Id;
Id : Entity_Id;
Def_Id : Entity_Id;
Tag_Typ : Entity_Id;
@@ -14805,12 +14804,7 @@ package body Sem_Prag is
then
Tag_Typ := Etype (Def_Id);
- Elmt := First_Elmt (Primitive_Operations (Tag_Typ));
- while Present (Elmt) and then Node (Elmt) /= Def_Id loop
- Next_Elmt (Elmt);
- end loop;
-
- Remove_Elmt (Primitive_Operations (Tag_Typ), Elmt);
+ Remove (Primitive_Operations (Tag_Typ), Def_Id);
Set_Is_Dispatching_Operation (Def_Id, False);
end if;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-07 16:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:26 [gcc r12-2124] [Ada] Simplify code by reusing Remove on list of primitive operations Pierre-Marie de Rodat
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).