]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 19 Jun 2009 10:32:08 +0000 (12:32 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 19 Jun 2009 10:32:08 +0000 (12:32 +0200)
2009-06-19  Robert Dewar  <dewar@adacore.com>

* g-cgi.adb: Minor reformatting

2009-06-19  Eric Botcazou  <ebotcazou@adacore.com>

* s-intman-solaris.adb (Notify_Exception): Do not discriminate on the
signal code for SIGFPE and raise Program_Error for SIGILL.

* s-osinte-solaris.ads: Remove signal code constants for SIGFPE.

2009-06-19  Ed Schonberg  <schonberg@adacore.com>

* sem_ch8.adb (Nvis_Messages): Do not list an entity declared in a
generic package if there is a visibility candidate that is declared in
a regular package.

From-SVN: r148691

gcc/ada/ChangeLog
gcc/ada/g-cgi.adb
gcc/ada/s-intman-solaris.adb
gcc/ada/s-osinte-solaris.ads
gcc/ada/sem_ch8.adb

index 0a469b26ddc45f10c970cfb43a512b7e67da9926..580763e367f01a6ce5ac307cc3eea6e82b41f2ac 100644 (file)
@@ -1,3 +1,20 @@
+2009-06-19  Robert Dewar  <dewar@adacore.com>
+
+       * g-cgi.adb: Minor reformatting
+
+2009-06-19  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * s-intman-solaris.adb (Notify_Exception): Do not discriminate on the
+       signal code for SIGFPE and raise Program_Error for SIGILL.
+
+       * s-osinte-solaris.ads: Remove signal code constants for SIGFPE.
+
+2009-06-19  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch8.adb (Nvis_Messages): Do not list an entity declared in a
+       generic package if there is a visibility candidate that is declared in
+       a regular package.
+
 2009-06-18  Olivier Hainque  <hainque@adacore.com>
 
        * system-aix64.ads: New file.
index b1b6789e4fb7c4d8c318cb71d0fe02e0f531e618..dad37381129d9f835585df1bf4e352b30ac54fa2 100644 (file)
@@ -123,8 +123,9 @@ package body GNAT.CGI is
               (Natural'Value ("16#" & S (K + 1 .. K + 2) & '#'));
             K := K + 3;
 
+         --  Plus sign is decoded as a space
+
          elsif S (K) = '+' then
-            --  + sign is decoded as a space
             Result (J) := ' ';
             K := K + 1;
 
index e8bd6ffe4193789fa8af1313a8ceed7390fca2a9..170cd82f8daca34e1e756ba43b0548041ab17b12 100644 (file)
@@ -89,40 +89,27 @@ package body System.Interrupt_Management is
       info    : access siginfo_t;
       context : access ucontext_t)
    is
+      pragma Unreferenced (info);
+
    begin
       --  Perform the necessary context adjustments prior to a raise
       --  from a signal handler.
 
       Adjust_Context_For_Raise (signo, context.all'Address);
 
-      --  Check that treatment of exception propagation here
-      --  is consistent with treatment of the abort signal in
-      --  System.Task_Primitives.Operations.
+      --  Check that treatment of exception propagation here is consistent with
+      --  treatment of the abort signal in System.Task_Primitives.Operations.
 
       case signo is
          when SIGFPE =>
-            case info.si_code is
-               when  FPE_INTDIV |
-                     FPE_INTOVF |
-                     FPE_FLTDIV |
-                     FPE_FLTOVF |
-                     FPE_FLTUND |
-                     FPE_FLTRES |
-                     FPE_FLTINV |
-                     FPE_FLTSUB =>
-
-                  raise Constraint_Error;
-
-               when others =>
-                  pragma Assert (False);
-                  null;
-            end case;
-
-         when SIGILL | SIGSEGV | SIGBUS  =>
+            raise Constraint_Error;
+         when SIGILL =>
+            raise Program_Error;
+         when SIGSEGV =>
+            raise Storage_Error;
+         when SIGBUS =>
             raise Storage_Error;
-
          when others =>
-            pragma Assert (False);
             null;
       end case;
    end Notify_Exception;
index 32213ccabd4bcdbcdf19b6ba066ce4629febbf3a..a937f6ea36a3fb96f2c88e6be66e51f1a3d10b1a 100644 (file)
@@ -7,7 +7,7 @@
 --                                  S p e c                                 --
 --                                                                          --
 --             Copyright (C) 1991-1994, Florida State University            --
---          Copyright (C) 1995-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1995-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL 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- --
@@ -168,15 +168,6 @@ package System.OS_Interface is
    --  More analysis is needed, after which these declarations may need to
    --  be changed.
 
-   FPE_INTDIV  : constant := 1; --  integer divide by zero
-   FPE_INTOVF  : constant := 2; --  integer overflow
-   FPE_FLTDIV  : constant := 3; --  floating point divide by zero
-   FPE_FLTOVF  : constant := 4; --  floating point overflow
-   FPE_FLTUND  : constant := 5; --  floating point underflow
-   FPE_FLTRES  : constant := 6; --  floating point inexact result
-   FPE_FLTINV  : constant := 7; --  invalid floating point operation
-   FPE_FLTSUB  : constant := 8; --  subscript out of range
-
    type greg_t is new int;
 
    type gregset_t is array (0 .. 18) of greg_t;
index 8ddefb58af054e013e98add6747188ef62f1d5da..4063b12397eebff5cf57e6c3c8c3580ea2fa6108 100644 (file)
@@ -3694,6 +3694,7 @@ package body Sem_Ch8 is
       procedure Nvis_Messages is
          Comp_Unit : Node_Id;
          Ent       : Entity_Id;
+         Found     : Boolean := False;
          Hidden    : Boolean := False;
          Item      : Node_Id;
 
@@ -3781,10 +3782,25 @@ package body Sem_Ch8 is
 
                   if Is_Hidden (Ent) then
                      Error_Msg_N ("non-visible (private) declaration#!", N);
+
+                  --  If the entity is declared in a generic package, it
+                  --  cannot be visible, so there is no point in adding it
+                  --  to the list of candidates if another homograph from a
+                  --  non-generic package has been seen.
+
+                  elsif Ekind (Scope (Ent)) = E_Generic_Package
+                    and then Found
+                  then
+                     null;
+
                   else
                      Error_Msg_N -- CODEFIX
                        ("non-visible declaration#!", N);
 
+                     if Ekind (Scope (Ent)) /= E_Generic_Package then
+                        Found := True;
+                     end if;
+
                      if Is_Compilation_Unit (Ent)
                        and then
                          Nkind (Parent (Parent (N))) = N_Use_Package_Clause