public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1590] [Ada] Don't check No_Wide_Characters restriction for illegal types
@ 2021-06-17 14:34 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-06-17 14:34 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fc473ce74c64fa0d5027aa4045579ec39d78a4c4
commit r12-1590-gfc473ce74c64fa0d5027aa4045579ec39d78a4c4
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Wed Mar 10 18:06:21 2021 +0100
[Ada] Don't check No_Wide_Characters restriction for illegal types
gcc/ada/
* sem_ch3.adb (Analyze_Private_Extension_Declaration): Check
No_Wide_Characters restriction after rejecting illegal parent
types.
(Derived_Type_Declaration): Likewise.
(Find_Type_Of_Subtype_Indic): Remove check for
No_Wide_Characters restriction, which was done too early.
Diff:
---
gcc/ada/sem_ch3.adb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 7194f354610..8d25a97fb0a 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -5121,6 +5121,8 @@ package body Sem_Ch3 is
goto Leave;
end if;
+ Check_Wide_Character_Restriction (Parent_Type, Indic);
+
-- Perhaps the parent type should be changed to the class-wide type's
-- specific type in this case to prevent cascading errors ???
@@ -17120,6 +17122,8 @@ package body Sem_Ch3 is
Error_Msg_N ("null exclusion can only apply to an access type", N);
end if;
+ Check_Wide_Character_Restriction (Parent_Type, Indic);
+
-- Avoid deriving parent primitives of underlying record views
Build_Derived_Type (N, Parent_Type, T, Is_Completion,
@@ -17979,10 +17983,6 @@ package body Sem_Ch3 is
Typ := Entity (S);
end if;
- -- Check No_Wide_Characters restriction
-
- Check_Wide_Character_Restriction (Typ, S);
-
return Typ;
end Find_Type_Of_Subtype_Indic;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-17 14:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 14:34 [gcc r12-1590] [Ada] Don't check No_Wide_Characters restriction for illegal types 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).