]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/exp_ch4.adb
exp_ch4.adb (Expand_N_Indexed_Component): For an indexed component with an implicit...
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 8 Dec 2004 11:26:46 +0000 (12:26 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 8 Dec 2004 11:26:46 +0000 (12:26 +0100)
commit2717634daab64ed32a49b329f61cf0064f80f046
tree80a2c09a38886e46b64411da23e90656c1713647
parente913f03badb889da71c50a230b357aac6561ea01
exp_ch4.adb (Expand_N_Indexed_Component): For an indexed component with an implicit dereference as its prefix...

* exp_ch4.adb (Expand_N_Indexed_Component): For an indexed component
with an implicit dereference as its prefix, use
Insert_Explicit_Dereference instead of merely rewriting the prefix into
an explicit dereference. This ensures that a reference to the original
prefix is generated, if appropriate.

* sem_util.adb (Insert_Explicit_Dereference): When an implicit
dereference is rewritten to an explicit one, generate a reference to
the entity denoted by its prefix using the original prefix node, so
the dereference can be properly recorded as a read of the denoted
access value, if appropriate.

* sem_warn.adb (Output_Unreferenced_Messages): Do not abstain from
emitting 'assigned but never read' warning on a variable on the basis
that it has an access type.
(Check_References): Emit unreferenced warning when the scope is a
subprogram body.

From-SVN: r91881
gcc/ada/exp_ch4.adb
gcc/ada/sem_util.adb
gcc/ada/sem_warn.adb