diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-11-23 23:44:06 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-15 06:41:51 -0500 |
commit | 10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc (patch) | |
tree | b584c011bd0c3768e2f94551a2ef82bf4e32efc0 | |
parent | cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c (diff) | |
download | gcc-10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc.zip gcc-10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc.tar.gz gcc-10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc.tar.bz2 |
[Ada] Refactor repeated code for component attributes
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Merge identical code for
First_Bit/Last_Bit and Position attributes.
-rw-r--r-- | gcc/ada/sem_attr.adb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 30fdfb8..537da93 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4094,6 +4094,7 @@ package body Sem_Attr is when Attribute_First_Bit | Attribute_Last_Bit + | Attribute_Position => Check_Component; Set_Etype (N, Universal_Integer); @@ -5305,9 +5306,7 @@ package body Sem_Attr is -- Position -- -------------- - when Attribute_Position => - Check_Component; - Set_Etype (N, Universal_Integer); + -- Shares processing with First_Bit attribute ---------- -- Pred -- |