]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Tweak error recovery path
authorRonan Desplanques <desplanques@adacore.com>
Thu, 6 Mar 2025 11:54:44 +0000 (12:54 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:09 +0000 (08:32 +0200)
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.

gcc/ada/sem_ch3.adb

index a8764db65032ccae54c0013e74c3e94e61d48b3a..4161ce39fa3e9c3dc9f88d1e172acd659c5d7652 100644 (file)
@@ -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