* g-socket.adb: Minor reformatting
2011-09-06 Javier Miranda <miranda@adacore.com>
* ali.adb (Scan_ALI): Add missing support to load references of
entities imported from other languages.
* ali.ads (Xref_Record): Adding new fields to store the language and
name of an imported entity.
* lib-xref.adb (Output_Import_Export_Info): Fix typo
in comment.
2011-09-06 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
is allowed on a full type declaration if it is the completion of
a private declarations.
* sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
aspect is allowed on a full type declaration in the private part
of a package.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178577
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-09-06 Robert Dewar <dewar@adacore.com>
+ * g-socket.adb: Minor reformatting
+
+2011-09-06 Javier Miranda <miranda@adacore.com>
+
+ * ali.adb (Scan_ALI): Add missing support to load references of
+ entities imported from other languages.
+ * ali.ads (Xref_Record): Adding new fields to store the language and
+ name of an imported entity.
+ * lib-xref.adb (Output_Import_Export_Info): Fix typo
+ in comment.
+
+2011-09-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
+ is allowed on a full type declaration if it is the completion of
+ a private declarations.
+ * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
+ aspect is allowed on a full type declaration in the private part
+ of a package.
+
+2011-09-06 Robert Dewar <dewar@adacore.com>
+
* sem_ch8.ads: Minor reformatting
2011-09-06 Thomas Quinot <quinot@adacore.com>
or else Nextc = '<' or else Nextc = '>'
or else Nextc = '=';
+ -- Terminate on comma
+
+ exit when Nextc = ',';
+
-- Terminate if left bracket not part of wide char sequence
-- Note that we only recognize brackets notation so far ???
-- Imported entities reference as in:
-- 494b<c,__gnat_copy_attribs>25
- -- ??? Simply skipped for now
if Nextc = '<' then
- while Getc /= '>' loop
- null;
- end loop;
+ Skipc;
+ XR.Imported_Lang := Get_Name;
+
+ pragma Assert (Nextc = ',');
+ Skipc;
+
+ XR.Imported_Name := Get_Name;
+
+ pragma Assert (Nextc = '>');
+ Skipc;
+ else
+ XR.Imported_Lang := No_Name;
+ XR.Imported_Name := No_Name;
end if;
XR.Col := Get_Nat;
-- ref1 is a reference to an entity that was instantied at ref2.
-- ref2 itself is also the result of an instantiation, that took
-- place at ref3
+
+ Imported_Lang : Name_Id := No_Name;
+ Imported_Name : Name_Id := No_Name;
+ -- Language and name of imported entity reference
end record;
package Xref is new Table.Table (
Socket : Socket_Type)
is
Last : aliased C.int := C.int (Item.Last);
+
begin
Check_For_Fd_Set (Socket);
+
if Item.Last /= No_Socket then
Remove_Socket_From_Set (Item.Set'Access, C.int (Socket));
Last_Socket_In_Set (Item.Set'Access, Last'Unchecked_Access);
is
begin
Check_For_Fd_Set (Socket);
+
return Item.Last /= No_Socket
and then Socket <= Item.Last
and then Is_Socket_In_Set (Item.Set'Access, C.int (Socket)) /= 0;
procedure Set (Item : in out Socket_Set_Type; Socket : Socket_Type) is
begin
Check_For_Fd_Set (Socket);
+
if Item.Last = No_Socket then
-- Uninitialized socket set, make sure it is properly zeroed out
procedure Output_Import_Export_Info (Ent : Entity_Id);
-- Output language and external name information for an interfaced
- -- entity, using the format <language, external_name>,
+ -- entity, using the format <language, external_name>
------------------------
-- Get_Type_Reference --
when Aspect_Invariant |
Aspect_Type_Invariant =>
- -- Check placement legality
+ -- Check placement legality: An invariant must apply to a
+ -- private type, or appear in the private part of a spec.
+ -- Analysis of the pragma will verify that in the private
+ -- part it applies to a completion.
- if not Nkind_In (N, N_Private_Type_Declaration,
+ if Nkind_In (N, N_Private_Type_Declaration,
N_Private_Extension_Declaration)
then
+ null;
+
+ elsif Nkind (N) = N_Full_Type_Declaration
+ and then In_Private_Part (Current_Scope)
+ then
+ null;
+
+ else
Error_Msg_N
("invariant aspect must apply to a private type", N);
end if;
if Typ = Any_Type then
return;
- elsif not Ekind_In (Typ, E_Private_Type,
+ -- An invariant must apply to a private type, or appear in the
+ -- private part of a package spec and apply to a completion.
+
+ elsif Ekind_In (Typ, E_Private_Type,
E_Record_Type_With_Private,
E_Limited_Private_Type)
then
+ null;
+
+ elsif In_Private_Part (Current_Scope)
+ and then Has_Private_Declaration (Typ)
+ then
+ null;
+
+ else
Error_Pragma_Arg
("pragma% only allowed for private type", Arg1);
end if;