[gcc r16-1319] ada: Remove unnecessary special handling
Marc Poulhies
dkm@gcc.gnu.org
Mon Jun 9 06:39:32 GMT 2025
https://gcc.gnu.org/g:6ad0d51d4e1d4cc16a68d4e1c588c65849335493
commit r16-1319-g6ad0d51d4e1d4cc16a68d4e1c588c65849335493
Author: Ronan Desplanques <desplanques@adacore.com>
Date: Tue Mar 4 14:29:07 2025 +0100
ada: Remove unnecessary special handling
This patch removes a special exemption in Enter_Name. That exemption was
preceded by a comment which described what situations it was supposed to
be required for, but it was unnecessary even in those situations.
gcc/ada/ChangeLog:
* sem_util.adb (Enter_Name): Remove special handling.
Diff:
---
gcc/ada/sem_util.adb | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 523aff33f95a..59bf060ee740 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -8082,17 +8082,7 @@ package body Sem_Util is
-- If we fall through, declaration is OK, at least OK enough to continue
- -- If Def_Id is a discriminant or a record component we are in the midst
- -- of inheriting components in a derived record definition. Preserve
- -- their Ekind and Etype.
-
- if Ekind (Def_Id) in E_Discriminant | E_Component then
- null;
-
- elsif Present (Etype (Def_Id)) then
- null;
-
- else
+ if No (Etype (Def_Id)) then
Set_Etype (Def_Id, Any_Type); -- avoid cascaded errors
end if;
More information about the Gcc-cvs
mailing list