diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 14:03:14 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-29 14:03:14 +0200 |
commit | 69cb258c42f443c2def36a9e6864c7a3538e323c (patch) | |
tree | 9f5514a9ff096b956b1cb4f99ac9d21c7f159811 | |
parent | 6874160d02e7dbcee6f2539daa6f884f3d958359 (diff) | |
download | gcc-69cb258c42f443c2def36a9e6864c7a3538e323c.tar.gz |
[multiple changes]
2009-04-29 Albert Lee <lee@adacore.com>
* g-socthi-vxworks.ads: Change the spec of Msghdr to match the one in
the default version of GNAT.Sockets.Thin.
* g-socthi-vms.ads: Change the spec of Msghdr to match the one in the
default version of GNAT.Sockets.Thin.
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Specification): If the subprogram is
an overriding operation of an inherited interface operation, and the
controlling type is a synchronized type, we replace the type with its
corresponding record, to match the proper signature of an overriding
operation. The same processing must be performed for an access
parameter whose designated type is derived from a synchronized
interface.
From-SVN: r146954
-rw-r--r-- | gcc/ada/g-socthi-vms.ads | 7 | ||||
-rw-r--r-- | gcc/ada/g-socthi-vxworks.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sem_ch6.adb | 18 |
3 files changed, 23 insertions, 6 deletions
diff --git a/gcc/ada/g-socthi-vms.ads b/gcc/ada/g-socthi-vms.ads index 9725d91e855..6df93351edd 100644 --- a/gcc/ada/g-socthi-vms.ads +++ b/gcc/ada/g-socthi-vms.ads @@ -59,14 +59,15 @@ package GNAT.Sockets.Thin is type Msghdr is record Msg_Name : System.Address; - Msg_Namelen : C.int; + Msg_Namelen : C.unsigned; Msg_Iov : System.Address; - Msg_Iovlen : C.int; + Msg_Iovlen : C.size_t; Msg_Control : System.Address; - Msg_Controllen : C.int; + Msg_Controllen : C.size_t; Msg_Flags : C.int; end record; pragma Convention (C, Msghdr); + -- This type needs comments??? function Socket_Errno return Integer renames GNAT.OS_Lib.Errno; -- Returns last socket error number diff --git a/gcc/ada/g-socthi-vxworks.ads b/gcc/ada/g-socthi-vxworks.ads index 91641550338..88638f99d02 100644 --- a/gcc/ada/g-socthi-vxworks.ads +++ b/gcc/ada/g-socthi-vxworks.ads @@ -59,9 +59,9 @@ package GNAT.Sockets.Thin is Msg_Name : System.Address; Msg_Namelen : C.unsigned; Msg_Iov : System.Address; - Msg_Iovlen : C.int; + Msg_Iovlen : C.size_t; Msg_Control : System.Address; - Msg_Controllen : C.unsigned; + Msg_Controllen : C.size_t; Msg_Flags : C.int; end record; pragma Convention (C, Msghdr); diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index c44a48b5696..1e7bf886d6a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, 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- -- @@ -2835,12 +2835,15 @@ package body Sem_Ch6 is -- inherited interface operation, and the controlling type is -- a synchronized type, replace the type with its corresponding -- record, to match the proper signature of an overriding operation. + -- Same processing for an access parameter whose designated type is + -- derived from a synchronized interface. if Ada_Version >= Ada_05 then declare Formal : Entity_Id; Formal_Typ : Entity_Id; Rec_Typ : Entity_Id; + Desig_Typ : Entity_Id; begin Formal := First_Formal (Designator); @@ -2855,6 +2858,19 @@ package body Sem_Ch6 is if Present (Interfaces (Rec_Typ)) then Set_Etype (Formal, Rec_Typ); end if; + + elsif Ekind (Formal_Typ) = E_Anonymous_Access_Type then + Desig_Typ := Designated_Type (Formal_Typ); + + if Is_Concurrent_Type (Desig_Typ) + and then Present (Corresponding_Record_Type (Desig_Typ)) + then + Rec_Typ := Corresponding_Record_Type (Desig_Typ); + + if Present (Interfaces (Rec_Typ)) then + Set_Directly_Designated_Type (Formal_Typ, Rec_Typ); + end if; + end if; end if; Next_Formal (Formal); |