]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Inheritance of pragma/aspect unchecked_union
authorJavier Miranda <miranda@adacore.com>
Thu, 12 Mar 2026 18:55:21 +0000 (18:55 +0000)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 29 May 2026 08:49:47 +0000 (10:49 +0200)
commit515006c744f22d2707efa6789b2ef10c36e2eaaf
treeeccf0d33170db8a09fa107c0cc240163a385fe86
parent2a27188924a81fc3948c56353e35935b6d5682fd
ada: Inheritance of pragma/aspect unchecked_union

Derived types inherit pragma/aspect uncheched union.

gcc/ada/ChangeLog:

* sem_ch3.adb (Build_Derived_Record_Type): Record type derivations
inherit Is_Unchecked_Union and Has_Unchecked_Union flags.
(Inherit_Component): Add discriminals to the associations list.
* exp_ch3.adb (Build_Record_Init_Proc): Derivations of Unchecked_Union
types don't need an initialization procedure; they reuse the init proc
of their parent type.
gcc/ada/exp_ch3.adb
gcc/ada/sem_ch3.adb