[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.
This commit is contained in:
parent
bc57641099
commit
ce20ff0260
1 changed files with 6 additions and 9 deletions
|
@ -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 --
|
||||
|
|
Loading…
Add table
Reference in a new issue