* [Ada] Detect qualified type names for AI12-0027
@ 2020-10-16 7:35 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-10-16 7:35 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
Type in a view conversion can be both qualified and unqualified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_View_Conversion): Detect qualified types.
* sem_util.ads (Is_Actual_In_Out_Parameter): Fix style in
comment.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 1004 bytes --]
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -19641,7 +19641,7 @@ package body Sem_Util is
function Is_View_Conversion (N : Node_Id) return Boolean is
begin
if Nkind (N) = N_Type_Conversion
- and then Nkind (Unqual_Conv (N)) = N_Identifier
+ and then Nkind (Unqual_Conv (N)) in N_Expanded_Name | N_Identifier
then
if Is_Tagged_Type (Etype (N))
and then Is_Tagged_Type (Etype (Unqual_Conv (N)))
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1598,7 +1598,7 @@ package Sem_Util is
function Is_Actual_In_Out_Parameter (N : Node_Id) return Boolean;
-- Determines if N is an actual parameter of in-out mode in a subprogram
- -- call
+ -- call.
function Is_Actual_Out_Parameter (N : Node_Id) return Boolean;
-- Determines if N is an actual parameter of out mode in a subprogram call
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-16 7:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 7:35 [Ada] Detect qualified type names for AI12-0027 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).