[Ada] Extend static functions
authorArnaud Charlet <charlet@adacore.com>
Wed, 27 May 2020 10:10:35 +0000 (06:10 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:40 +0000 (09:42 -0400)
commit8cd5951d68b98425beec4a632abcdc3c559074a4
treeaf7d3ce514dc5102c4a9eb08613c871fb1337be0
parentfa02302bc17def4530df18fd5d77d0236cacb395
[Ada] Extend static functions

gcc/ada/

* inline.adb, inline.ads
(Inline_Static_Expression_Function_Call): Renamed
Inline_Static_Function_Call.
* sem_ch13.adb (Analyze_Aspect_Static): Allow static intrinsic
imported functions under -gnatX.
* sem_util.ads, sem_util.adb (Is_Static_Expression_Function):
Renamed Is_Static_Function.
(Is_Static_Expression_Function_Call): Renamed
Is_Static_Function_Call.
* sem_ch6.adb, sem_elab.adb, sem_res.adb: Update calls to
Is_Static_Function*.
* sem_eval.adb (Fold_Dummy, Eval_Intrinsic_Call, Fold_Shift):
New.
(Eval_Call): Add support for intrinsic calls, code refactoring.
(Eval_Entity_Name): Code refactoring.
(Eval_Logical_Op): Update comment.
(Eval_Shift): Call Fold_Shift. Update comments.
* par-prag.adb (Par [Pragma_Extensions_Allowed]): Set
Ada_Version to Ada_Version_Type'Last to handle
Extensions_Allowed (On) consistently.
* opt.ads (Extensions_Allowed): Update documentation.
* sem_attr.adb: Update comment.
* doc/gnat_rm/implementation_defined_pragmas.rst: Update
documentation of Extensions_Allowed.
* gnat_rm.texi: Regenerate.
14 files changed:
gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/gnat_rm.texi
gcc/ada/inline.adb
gcc/ada/inline.ads
gcc/ada/opt.ads
gcc/ada/par-prag.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_elab.adb
gcc/ada/sem_eval.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads