[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 13:22:48 +0000 (15:22 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 27 Apr 2016 13:22:48 +0000 (15:22 +0200)
2016-04-27  Arnaud Charlet  <charleT@adacore.com>

* sinput-l.ads, sem_ch13.adb: Minor editing.

2016-04-27  Doug Rupp  <rupp@adacore.com>

* init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
Bump the pc so the lower order bit is set.

2016-04-27  Ed Schonberg  <schonberg@adacore.com>

* sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
enabled, report an empty range in a case construct.

From-SVN: r235503

gcc/ada/ChangeLog
gcc/ada/init.c
gcc/ada/sem_case.adb
gcc/ada/sem_case.ads
gcc/ada/sem_ch13.adb
gcc/ada/sinput-l.ads

index cdc9cb8d5bfbe603ccc4e9027dfbf076b7dd4e5a..a69659d6e3dadbe8711b38609ded294219032818 100644 (file)
@@ -1,3 +1,17 @@
+2016-04-27  Arnaud Charlet  <charleT@adacore.com>
+
+       * sinput-l.ads, sem_ch13.adb: Minor editing.
+
+2016-04-27  Doug Rupp  <rupp@adacore.com>
+
+       * init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
+       Bump the pc so the lower order bit is set.
+
+2016-04-27  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
+       enabled, report an empty range in a case construct.
+
 2016-04-27  Arnaud Charlet  <charlet@adacore.com>
 
        * sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
index 43ea1e78dad3338c4c3ae17890bcc144c0627b04..440a068d2721253402a380ed1006329f9ec45e86 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2015, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2016, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -503,6 +503,11 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext)
 #elif defined (__ARMEL__)
   /* ARM Bump has to be an even number because of odd/even architecture.  */
   mcontext->arm_pc+=2;
+#ifdef __thumb2__
+  /* For thumb, the return address much have the low order bit set, otherwise
+     the unwwinder will reset to "arm" mode upon return.  It's a feature.  */
+  mcontext->arm_pc+=1;
+#endif
 #endif
 }
 
index a23358afe2e8113047f85efba81ae9a37ccc7b53..ee845ee19475b29863f3d4e8be389589726bff03 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1996-2015, Free Software Foundation, Inc.         --
+--          Copyright (C) 1996-2016, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -1126,9 +1126,13 @@ package body Sem_Case is
    -----------
 
    procedure No_OP (C : Node_Id) is
-      pragma Warnings (Off, C);
    begin
-      null;
+      if Nkind (C) = N_Range and then Warn_On_Redundant_Constructs then
+         Error_Msg_N ("choice is an empty range?", C);
+
+      else
+         null;
+      end if;
    end No_OP;
 
    -----------------------------
index c6917f06837da620d6dd6ed502c16b105da3e370..9e9e82833c62ed157a56030bcb7401dbb3e2ddf8 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1996-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1996-2016, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -86,9 +86,10 @@ with Types; use Types;
 package Sem_Case is
 
    procedure No_OP (C : Node_Id);
-   --  The no-operation routine. Does absolutely nothing. Can be used
+   --  The no-operation routine. Does mostly nothing. Can be used
    --  in the following generics for the parameters Process_Empty_Choice,
-   --  or Process_Associated_Node.
+   --  or Process_Associated_Node. In the case of an empty range choice,
+   --  routine emits a warning when Warn_On_Redundant_Constructs is enabled.
 
    generic
       with procedure Process_Associated_Node (A : Node_Id);
index d42b7cad79e3f9e71fe17989dad037630cc7885a..8afc5429e484c02871e57c07804b8a3671d9021a 100644 (file)
@@ -6202,8 +6202,8 @@ package body Sem_Ch13 is
    -----------------------------------------------
 
    procedure Analyze_Enumeration_Representation_Clause (N : Node_Id) is
-      Ident    : constant Node_Id    := Identifier (N);
-      Aggr     : constant Node_Id    := Array_Aggregate (N);
+      Ident    : constant Node_Id := Identifier (N);
+      Aggr     : constant Node_Id := Array_Aggregate (N);
       Enumtype : Entity_Id;
       Elit     : Entity_Id;
       Expr     : Node_Id;
index c1ac9c512fc44e1d2b70f263423c14162ecdf3df..9cb29482f6139ec0cda295fe49aba5a7e8f28a9f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2016, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -119,7 +119,7 @@ private
       --  be applied, used to ensure that no incorrect adjustments are
       --  made. Really it is a bug if anyone ever tries to adjust outside
       --  this range, but since we are only doing this anyway for getting
-      --  better error messages, it is not critical
+      --  better error messages, it is not critical.
 
    end record;