aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2018-11-14 11:41:36 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-11-14 11:41:36 +0000
commit1e3c434fa08b0ee0e4f9b5ce803e282d8832a559 (patch)
tree53c1e8aff76e28c94f53a22b6ebaf2c960a5812c /gcc/expr.h
parent43018f5892ff43551abad3f339bcb55cf74c89cf (diff)
downloadgcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.zip
gcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.tar.gz
gcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.tar.bz2
[Ada] System'To_Address not always static
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
Diffstat (limited to 'gcc/expr.h')
0 files changed, 0 insertions, 0 deletions