]> gcc.gnu.org Git - gcc.git/commitdiff
ada: Remove Must_Not_Freeze flags from default value expressions
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 21 Jun 2024 13:27:41 +0000 (15:27 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 1 Aug 2024 15:14:35 +0000 (17:14 +0200)
This is a code cleanup and apparently has no impact on the behavior.

The Must_Not_Freeze is saved/set/restored by Preanalyze_Spec_Expression,
so it doesn't need to be set before calling that routine and apparently
doesn't need to be set after that calling that routine either.

gcc/ada/

* sem_ch13.adb (Resolve_Aspect_Expression): Don't set
Must_Not_Freeze before preanalyzing spec expressions.

gcc/ada/sem_ch13.adb

index a7936641d3430f17c5034aece46c2cf4fde7c9ed..c8fe7d367c10cec873c165652136a1adc88e3db4 100644 (file)
@@ -16060,7 +16060,6 @@ package body Sem_Ch13 is
                   --  before the actual freeze point.
 
                   when Aspect_Default_Value =>
-                     Set_Must_Not_Freeze (Expr);
                      Preanalyze_Spec_Expression (Expr, E);
 
                   when Aspect_CPU
@@ -16076,7 +16075,6 @@ package body Sem_Ch13 is
                   --  relevant to the misuse of deferred constants.
 
                   when Aspect_Storage_Size =>
-                     Set_Must_Not_Freeze (Expr);
                      Preanalyze_Spec_Expression (Expr, Any_Integer);
 
                   when others =>
This page took 0.065039 seconds and 5 git commands to generate.