public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2023] [Ada] Fix missing minus sign in literal translation
@ 2021-07-05 13:14 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-05 13:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2644eaa0b91e25d01b5c847131bf7caafc7c4588

commit r12-2023-g2644eaa0b91e25d01b5c847131bf7caafc7c4588
Author: Ghjuvan Lacambre <lacambre@adacore.com>
Date:   Wed Apr 28 11:03:03 2021 +0200

    [Ada] Fix missing minus sign in literal translation
    
    gcc/ada/
    
            * sem_res.adb (Resolve): Insert minus sign if needed.

Diff:
---
 gcc/ada/sem_res.adb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index fb40484f2a6..494904faa55 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -2934,6 +2934,11 @@ package body Sem_Res is
                      else
                         UI_Image (Norm_Num (Expr_Value_R (Expr)), Decimal);
                         Start_String;
+
+                        if UR_Is_Negative (Expr_Value_R (Expr)) then
+                           Store_String_Chars ("-");
+                        end if;
+
                         Store_String_Chars
                           (UI_Image_Buffer (1 .. UI_Image_Length));
                         Param1 := Make_String_Literal (Loc, End_String);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-05 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:14 [gcc r12-2023] [Ada] Fix missing minus sign in literal translation 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).