From: Piotr Trojanek Date: Wed, 13 Jan 2021 11:53:21 +0000 (+0100) Subject: [Ada] Detect unchecked union components with fully qualified names X-Git-Tag: basepoints/gcc-13~7811 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43f69ac8b2d08a18497e124422cbb6031539421c;p=thirdparty%2Fgcc.git [Ada] Detect unchecked union components with fully qualified names gcc/ada/ * exp_ch4.adb (Component_Is_Unconstrained_UU): Detect both qualified and unqualified names of unchecked union components. --- diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index ca2372739974..e8fa5a8f3f54 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -8154,7 +8154,7 @@ package body Exp_Ch4 is -- Unconstrained nominal type. In the case of a constraint -- present, the node kind would have been N_Subtype_Indication. - if Nkind (Sindic) = N_Identifier then + if Nkind (Sindic) in N_Expanded_Name | N_Identifier then return Is_Unchecked_Union (Base_Type (Etype (Sindic))); end if;