public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6050] [Ada] Refactor repeated code for component attributes
@ 2020-12-15 11:43 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-15 11:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc
commit r11-6050-g10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Mon Nov 23 23:44:06 2020 +0100
[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.
Diff:
---
gcc/ada/sem_attr.adb | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 30fdfb8c55d..537da93dc66 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 --
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 11:43 [gcc r11-6050] [Ada] Refactor repeated code for component attributes Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).