diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-11-24 00:18:47 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-15 06:41:53 -0500 |
commit | ce20ff0260c24c3da9012e4226e9eb04d01a5221 (patch) | |
tree | 184e54bb1cb0deea521ef55770ed2aa95591ec3b /gcc/ada/sem_attr.adb | |
parent | bc57641099316c8dde5258e1e3f5365ef1ac35d0 (diff) | |
download | gcc-ce20ff0260c24c3da9012e4226e9eb04d01a5221.zip gcc-ce20ff0260c24c3da9012e4226e9eb04d01a5221.tar.gz gcc-ce20ff0260c24c3da9012e4226e9eb04d01a5221.tar.bz2 |
[Ada] Refactor repeated code for Width attributes
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Merge identical code for
Wide_Wide_Width, Wide_Width and Width attributes.
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4e4c27a..285b260 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -7219,7 +7219,10 @@ package body Sem_Attr is -- Wide_Wide_Width -- --------------------- - when Attribute_Wide_Wide_Width => + when Attribute_Wide_Wide_Width + | Attribute_Wide_Width + | Attribute_Width + => Check_E0; Check_Scalar_Type; Set_Etype (N, Universal_Integer); @@ -7228,19 +7231,13 @@ package body Sem_Attr is -- Wide_Width -- ---------------- - when Attribute_Wide_Width => - Check_E0; - Check_Scalar_Type; - Set_Etype (N, Universal_Integer); + -- Shares processing with Wide_Wide_Width attribute ----------- -- Width -- ----------- - when Attribute_Width => - Check_E0; - Check_Scalar_Type; - Set_Etype (N, Universal_Integer); + -- Shares processing with Wide_Wide_Width attribute --------------- -- Word_Size -- |