[Ada] Implement AI12-0275 (Make subtype_mark optional in object renamings)
commit4f31d6dbb8deafd7ab54e70eddfd931b10b3309b
authorGary Dismukes <dismukes@adacore.com>
Fri, 24 Jan 2020 19:11:47 +0000 (24 14:11 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 4 Jun 2020 09:11:10 +0000 (4 05:11 -0400)
treefc6f000859ceafe678afb79e961ac60f729e277d
parent96cd8940614e0f87aca7bb6064a45710aca6212f
[Ada] Implement AI12-0275 (Make subtype_mark optional in object renamings)

2020-06-04  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

* par-ch3.adb (P_Identifier_Declarations): Add parsing of object
renamings that have neither a subtype_mark nor an
access_definition. Issue an error if the version is earlier than
Ada_2020, and suggest using -gnatX.
* sem_ch8.adb (Analyze_Object_Renaming): Handle
object_renaming_declarations that don't have an explicit
subtype. Errors are issued when the name is inappropriate or
ambiguous, and otherwise the Etype of the renaming entity is set
from the Etype of the renamed object.
* sem_util.adb (Has_Null_Exclusion): Allow for the case of no
subtype given in an N_Object_Renaming_Declaration.
* sprint.adb (Sprint_Node_Actual): Handle printing of
N_Object_Renaming_Declarations that are specified without an
explicit subtype.
gcc/ada/par-ch3.adb
gcc/ada/sem_ch8.adb
gcc/ada/sem_util.adb
gcc/ada/sprint.adb