sinfo.ads
535 KB
-
[Ada] System'To_Address not always static · 1e3c434f
System'To_Address is supposed to be static when its parameter is static. This patch fixes a bug in which it is considered nonstatic when used as the initial value of a variable with the Thread_Local_Storage aspect, so the compiler incorrectly gives an error when initializing such a variable with System'To_Address (0). 2018-11-14 Bob Duff <duff@adacore.com> gcc/ada/ * sem_attr.adb (To_Address): Simplify setting of Is_Static_Expression. Remove second (unconditional) call to Set_Is_Static_Expression -- surely it's not static if the operand is not. Initialize Static on declaration. Do not try to fold 'To_Address, even though it's static. * exp_attr.adb (To_Address): Preserve Is_Static_Expression. * sinfo.ads, sem_eval.ads, sem_eval.adb (Is_Static_Expression, Is_OK_Static_Expression, Raises_Constraint_Error): Simplify documentation. There was too much repetition and redundancy. From-SVN: r266124
Bob Duff committed