* [Ada] Remove repeated analysis for pragma Thread_Local_Storage
@ 2022-07-05 8:29 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-05 8:29 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
[-- Attachment #1: Type: text/plain, Size: 329 bytes --]
When analysing pragma Thread_Local_Storage its argument is analysed by
the call to Check_Arg_Is_Library_Level_Local_Name. There is no need to
reanalyse it. Code cleanup; behaviour is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Remove unnecessary call to
Analyze.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 391 bytes --]
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -24861,7 +24861,6 @@ package body Sem_Prag is
Check_Arg_Is_Library_Level_Local_Name (Arg1);
Id := Get_Pragma_Arg (Arg1);
- Analyze (Id);
if not Is_Entity_Name (Id)
or else Ekind (Entity (Id)) /= E_Variable
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-05 8:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 8:29 [Ada] Remove repeated analysis for pragma Thread_Local_Storage 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).