]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Apr 2009 13:06:08 +0000 (15:06 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 17 Apr 2009 13:06:08 +0000 (15:06 +0200)
2009-04-17  Pascal Obry  <obry@adacore.com>

* initialize.c: Fix test for reallocating the arguments array.

2009-04-17  Geert Bosch  <bosch@adacore.com>

* 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  <lambourg@adacore.com>

* g-comlin.adb (Initialize_Scan_Option): Make sure the sections are
reinitialized.

From-SVN: r146261

gcc/ada/ChangeLog
gcc/ada/exp_fixd.adb
gcc/ada/g-comlin.adb
gcc/ada/initialize.c

index 5b8d3a1314bd984cd4ccbbbcac9d4cc9c89c0cd5..8cecbe3551ad2381f775460c49af5e2dcb2f4f9e 100644 (file)
@@ -1,3 +1,17 @@
+2009-04-17  Pascal Obry  <obry@adacore.com>
+
+       * initialize.c: Fix test for reallocating the arguments array.
+
+2009-04-17  Geert Bosch  <bosch@adacore.com>
+
+       * 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  <lambourg@adacore.com>
+
+       * g-comlin.adb (Initialize_Scan_Option): Make sure the sections are
+       reinitialized.
+
 2009-04-17  Robert Dewar  <dewar@adacore.com>
 
        * exp_ch5.adb (Expand_Assign_Array): Do not set Forwards_OK and
index afac7b0b298e7d3150c04949b89d6bc1b2e42bea..fa878c2bf7861d63de712cdaec409d42a8a51598 100644 (file)
@@ -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;
 
index 1fbcda463db7c74edb648143cc4fcea61a97b52b..8ee4f427dfb3841f4b20c5695c49adbcd2757c0a 100644 (file)
@@ -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
index 5a1417b927dfd45c13bd361b699061d3ff04a851..f5acbe6593a9136a6dbce9078b609e9253149601 100644 (file)
@@ -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 *));