https://gcc.gnu.org/g:e9066cf788e689a119a068ecf38e17c666bfb6a4

commit r16-1325-ge9066cf788e689a119a068ecf38e17c666bfb6a4
Author: Ronan Desplanques <desplanq...@adacore.com>
Date:   Thu Mar 6 12:54:44 2025 +0100

    ada: Tweak error recovery path
    
    Before this patch, the constant mark of object declarations was stripped
    in some error situations. This behavior is currently not useful so this
    patch removes it.
    
    gcc/ada/ChangeLog:
    
            * sem_ch3.adb (Analyze_Object_Declaration): Tweak error handling.

Diff:
---
 gcc/ada/sem_ch3.adb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index a8764db65032..4161ce39fa3e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -4552,7 +4552,6 @@ package body Sem_Ch3 is
             Error_Msg_N
               ("\declaration requires an initialization expression",
                 N);
-            Set_Constant_Present (N, False);
 
          --  In Ada 83, deferred constant must be of private type

Reply via email to