[COMMITTED,03/31] ada: Use the syntax of Ada 2012 if-expression in -gnatR3 output

Message ID 20250107125350.619654-3-poulhies@adacore.com
State New
Headers
Series [COMMITTED,01/31] ada: Restrict previous change made to expansion of allocators |

Commit Message

Marc Poulhiès Jan. 7, 2025, 12:53 p.m. UTC
  From: Eric Botcazou <ebotcazou@adacore.com>

This uses the syntax of Ada 2012 if-expression in the output produced by the
-gnatR3 switch for dynamic expressions.

gcc/ada/ChangeLog:

	* repinfo.adb (List_GCC_Expression.Print_Expr) <Cond_Expr>: Do not
	output the final "end".

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

---
 gcc/ada/repinfo.adb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
index c08a232a3ab..969aa63c698 100644
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.adb
@@ -683,7 +683,7 @@  package body Repinfo is
                         Print_Expr (Node.Op2);
                         Write_Str (" else ");
                         Print_Expr (Node.Op3);
-                        Write_Str (" end)");
+                        Write_Str (")");
                      end if;
 
                   when Plus_Expr =>