diff mbox series

[COMMITTED,21/30] ada: Further refine 'Super attribute

Message ID 20240520074858.222435-21-poulhies@adacore.com
State New
Headers show
Series [COMMITTED,01/30] ada: Rework and augment documentation on strict aliasing | expand

Commit Message

Marc Poulhiès May 20, 2024, 7:48 a.m. UTC
From: Justin Squirek <squirek@adacore.com>

This patch relaxes the restriction on 'Super such that it can apply to abstract
type objects.

gcc/ada/

	* sem_attr.adb (Analyze_Attribute): Remove restriction on 'Super
	for abstract types.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_attr.adb | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index df52229b6aa..403810c8b5e 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -6683,10 +6683,6 @@  package body Sem_Attr is
             elsif Depends_On_Private (P_Type) then
                Error_Attr_P ("prefix type of % is a private extension");
 
-            --  Check that we don't view convert to an abstract type
-
-            elsif Is_Abstract_Type (Node (First_Elmt (Parents))) then
-               Error_Attr_P ("type of % cannot be abstract");
             end if;
 
             --  Generate a view conversion and analyze it