[COMMITTED,03/35] ada: Forbid repr clauses for decls in handled_stmts

Message ID 20241025091107.485741-3-poulhies@adacore.com
State Committed
Commit d1cb12a5b870daccfaf2b4d9c91646a00eb01aee
Headers
Series [COMMITTED,01/35] ada: Pass parameters of full access unconstrained array types by copy in calls |

Commit Message

Marc Poulhiès Oct. 25, 2024, 9:10 a.m. UTC
  From: Raphaël AMIARD <amiard@adacore.com>

gcc/ada/ChangeLog:

	* par-ch5.adb (P_Sequence_Of_Statements): Forbid repr clauses in
	handled_statements.

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

---
 gcc/ada/par-ch5.adb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/par-ch5.adb
index 557aaf1ff68..34c845f838c 100644
--- a/gcc/ada/par-ch5.adb
+++ b/gcc/ada/par-ch5.adb
@@ -257,8 +257,7 @@  package body Ch5 is
                   while Present (Decl) loop
                      if not (Nkind (Decl) in
                         N_Object_Declaration | N_Object_Renaming_Declaration |
-                        N_Use_Type_Clause | N_Use_Package_Clause |
-                        N_Representation_Clause)
+                        N_Use_Type_Clause | N_Use_Package_Clause)
                      then
                         Error_Msg
                           ("Declaration kind not allowed in statements lists",