aboutsummaryrefslogtreecommitdiff
path: root/gcc/hash-table.h
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2023-03-08 12:15:13 -0500
committerMarc Poulhiès <poulhies@adacore.com>2023-05-25 09:44:18 +0200
commit14bf9f7bb7fe6176532414093f9a5084bbd41428 (patch)
treec88ab2fa628b09bcc7b498bf5a028fd2d92ac5ed /gcc/hash-table.h
parent5b8bdb676dae45d51af82c7e56968d1e1af1a494 (diff)
downloadgcc-14bf9f7bb7fe6176532414093f9a5084bbd41428.zip
gcc-14bf9f7bb7fe6176532414093f9a5084bbd41428.tar.gz
gcc-14bf9f7bb7fe6176532414093f9a5084bbd41428.tar.bz2
ada: Switch from E_Void to Is_Not_Self_Hidden
We had previously used Ekind = E_Void to indicate that a declaration is self-hidden. We now use the Is_Not_Self_Hidden flag instead. This allows us to avoid many "vanishing fields", which are (possibly-latent) bugs, and we now enable the assertions in Atree that detect such bugs. gcc/ada/ * atree.adb (Check_Vanishing_Fields): Fix bug in the "blah type only" cases. Remove the special cases for E_Void. Misc cleanup. (Mutate_Nkind): Disallow mutating to the same kind. (Mutate_Ekind): Disallow mutating to E_Void. (From E_Void is still OK -- entities start out as E_Void by default.) Fix bug in statistics gathering -- was setting the wrong count. Enable Check_Vanishing_Fields for entities. * sem_ch8.adb (Is_Self_Hidden): New function. (Find_Direct_Name): Call Is_Self_Hidden to use the new Is_Not_Self_Hidden flag to determine whether a declaration is hidden from all visibility by itself. This replaces the old method of checking E_Void. (Find_Expanded_Name): Likewise. (Find_Selected_Component): Likewise. * sem_util.adb (Enter_Name): Remove setting of Ekind to E_Void. * sem_ch3.adb: Set the Is_Not_Self_Hidden flag in appropriate places. Comment fixes. (Inherit_Component): Remove setting of Ekind to E_Void. * sem_ch9.adb (Analyze_Protected_Type_Declaration): Update comment. Skip Itypes, which should not be turned into components. * atree.ads (Mutate_Nkind): Document error case. (Mutate_Ekind): Remove comments apologizing for E_Void mutations. Document error cases.
Diffstat (limited to 'gcc/hash-table.h')
0 files changed, 0 insertions, 0 deletions