public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2157] [Ada] Remove redundant condition for listing compilation units
@ 2021-07-08 13:37 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-08 13:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e959418a07c3753877aac9a3194d740c38e7058b
commit r12-2157-ge959418a07c3753877aac9a3194d740c38e7058b
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Tue May 25 20:41:55 2021 +0200
[Ada] Remove redundant condition for listing compilation units
gcc/ada/
* par-ch10.adb (Unit_Display): Remove redundant condition; fix
whitespace.
Diff:
---
gcc/ada/par-ch10.adb | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb
index 9a49d45b8ab..f02934afc7e 100644
--- a/gcc/ada/par-ch10.adb
+++ b/gcc/ada/par-ch10.adb
@@ -1162,24 +1162,22 @@ package body Ch10 is
Loc : Source_Ptr;
SR_Present : Boolean)
is
- Unum : constant Unit_Number_Type := Get_Cunit_Unit_Number (Cunit);
- Sind : constant Source_File_Index := Source_Index (Unum);
- Unam : constant Unit_Name_Type := Unit_Name (Unum);
+ Unum : constant Unit_Number_Type := Get_Cunit_Unit_Number (Cunit);
+ Sind : constant Source_File_Index := Source_Index (Unum);
+ Unam : constant Unit_Name_Type := Unit_Name (Unum);
begin
- if List_Units then
- Write_Str ("Unit ");
- Write_Unit_Name (Unit_Name (Unum));
- Unit_Location (Sind, Loc);
+ Write_Str ("Unit ");
+ Write_Unit_Name (Unit_Name (Unum));
+ Unit_Location (Sind, Loc);
- if SR_Present then
- Write_Str (", SR");
- end if;
-
- Write_Str (", file name ");
- Write_Name (Get_File_Name (Unam, Nkind (Unit (Cunit)) = N_Subunit));
- Write_Eol;
+ if SR_Present then
+ Write_Str (", SR");
end if;
+
+ Write_Str (", file name ");
+ Write_Name (Get_File_Name (Unam, Nkind (Unit (Cunit)) = N_Subunit));
+ Write_Eol;
end Unit_Display;
-------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-08 13:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 13:37 [gcc r12-2157] [Ada] Remove redundant condition for listing compilation units 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).