aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index c49a2016..08b0087 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -6554,6 +6554,14 @@ package body Sem_Prag is
Def_Id := Entity (Id);
+ -- Check if already defined as constructor
+
+ if Is_Constructor (Def_Id) then
+ Error_Msg_N
+ ("?duplicate argument for pragma 'C'P'P_Constructor", Arg1);
+ return;
+ end if;
+
if Ekind (Def_Id) = E_Function
and then (Is_CPP_Class (Etype (Def_Id))
or else (Is_Class_Wide_Type (Etype (Def_Id))