From bd4b644b8fa7d902ab5624f52dc15c36a5634722 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 17 Apr 2009 13:06:08 +0000 Subject: [PATCH] 2009-04-17 Pascal Obry * initialize.c: Fix test for reallocating the arguments array. 2009-04-17 Geert Bosch * exp_fixd.adb (Expand_Convert_Float_To_Fixed): Have float to fixed conversion truncate only for decimal fixed point types. 2009-04-17 Jerome Lambourg * g-comlin.adb (Initialize_Scan_Option): Make sure the sections are reinitialized. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146261 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 14 ++++++++++++++ gcc/ada/exp_fixd.adb | 4 +++- gcc/ada/g-comlin.adb | 1 + gcc/ada/initialize.c | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5b8d3a1..8cecbe3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2009-04-17 Pascal Obry + + * initialize.c: Fix test for reallocating the arguments array. + +2009-04-17 Geert Bosch + + * exp_fixd.adb (Expand_Convert_Float_To_Fixed): Have float to fixed + conversion truncate only for decimal fixed point types. + +2009-04-17 Jerome Lambourg + + * g-comlin.adb (Initialize_Scan_Option): Make sure the sections are + reinitialized. + 2009-04-17 Robert Dewar * exp_ch5.adb (Expand_Assign_Array): Do not set Forwards_OK and diff --git a/gcc/ada/exp_fixd.adb b/gcc/ada/exp_fixd.adb index afac7b0..fa878c2 100644 --- a/gcc/ada/exp_fixd.adb +++ b/gcc/ada/exp_fixd.adb @@ -1701,13 +1701,15 @@ package body Exp_Fixd is Set_Result (N, Expr, Rng_Check, Trunc => True); -- Normal case where multiply is required + -- Rounding is truncating for decimal fixed point types only, + -- see RM 4.6(29). else Set_Result (N, Build_Multiply (N, Fpt_Value (Expr), Real_Literal (N, Ureal_1 / Small)), - Rng_Check, Trunc => True); + Rng_Check, Trunc => Is_Decimal_Fixed_Point_Type (Result_Type)); end if; end Expand_Convert_Float_To_Fixed; diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index 1fbcda4..8ee4f42 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -890,6 +890,7 @@ package body GNAT.Command_Line is Parser.In_Expansion := False; Parser.Switch_Character := Switch_Char; Parser.Stop_At_First := Stop_At_First_Non_Switch; + Parser.Section := (others => 1); -- If we are using sections, we have to preprocess the command line -- to delimit them. A section can be repeated, so we just give each diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index 5a1417b..f5acbe6 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -82,7 +82,7 @@ append_arg (int *index, LPWSTR value, char ***argv, int *last) { int size; - if (*last < *index) + if (*last <= *index) { *last += EXPAND_ARGV_RATE; *argv = (char **) xrealloc (*argv, (*last) * sizeof (char *)); -- 2.7.4