+2012-03-09 Robert Dewar <dewar@adacore.com>
+
+ * s-osinte-linux.ads, sem_util.adb, s-taprop-linux.adb, exp_ch4.adb,
+ a-strsup.ads, sem_ch6.adb, a-stwisu.ads, exp_ch3.adb,
+ a-stzsup.ads: Minor reformatting.
+
+2012-03-09 Thomas Quinot <quinot@adacore.com>
+
+ * s-ransee-vms.adb: Minor reformatting.
+
+2012-03-09 Arnaud Charlet <charlet@adacore.com>
+
+ * comperr.adb (Delete_SCIL_Files): Fix handling of
+ N_Package_Renaming_Declaration and N_Generic_Package_Declaration.
+
2012-03-09 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Check_Body_To_Inline): In AAMP and VM targets
package Ada.Strings.Superbounded is
pragma Preelaborate;
+ -- Type Bounded_String in Ada.Strings.Bounded.Generic_Bounded_Length is
+ -- derived from Super_String, with the constraint of the maximum length.
+
type Super_String (Max_Length : Positive) is record
Current_Length : Natural := 0;
Data : String (1 .. Max_Length);
- -- A previous version had a default initial value for Data, which is no
- -- longer necessary, because we now special-case this type in the
- -- compiler, so "=" composes properly for descendants of this
- -- type. Leaving it out is more efficient.
+ -- A previous version had a default initial value for Data, which is
+ -- no longer necessary, because we now special-case this type in the
+ -- compiler, so "=" composes properly for descendants of this type.
+ -- Leaving it out is more efficient.
end record;
- -- Type Bounded_String in Ada.Strings.Bounded.Generic_Bounded_Length is
- -- derived from this type, with the constraint of the maximum length.
-- The subprograms defined for Super_String are similar to those
-- defined for Bounded_String, except that they have different names, so
Wide_NUL : constant Wide_Character := Wide_Character'Val (0);
+ -- Ada.Strings.Wide_Bounded.Generic_Bounded_Length.Wide_Bounded_String is
+ -- derived from Super_String, with the constraint of the maximum length.
+
type Super_String (Max_Length : Positive) is record
Current_Length : Natural := 0;
Data : Wide_String (1 .. Max_Length);
- -- A previous version had a default initial value for Data, which is no
- -- longer necessary, because we now special-case this type in the
- -- compiler, so "=" composes properly for descendants of this
- -- type. Leaving it out is more efficient.
+ -- A previous version had a default initial value for Data, which is
+ -- no longer necessary, because we now special-case this type in the
+ -- compiler, so "=" composes properly for descendants of this type.
+ -- Leaving it out is more efficient.
end record;
- -- Ada.Strings.Wide_Bounded.Generic_Bounded_Length.Wide_Bounded_String is
- -- derived from this type, with the constraint of the maximum length.
-- The subprograms defined for Super_String are similar to those defined
-- for Bounded_Wide_String, except that they have different names, so that
Wide_Wide_NUL : constant Wide_Wide_Character :=
Wide_Wide_Character'Val (0);
+ -- Wide_Wide_Bounded.Generic_Bounded_Length.Wide_Wide_Bounded_String is
+ -- derived from Super_String, with the constraint of the maximum length.
+
type Super_String (Max_Length : Positive) is record
Current_Length : Natural := 0;
Data : Wide_Wide_String (1 .. Max_Length);
- -- A previous version had a default initial value for Data, which is no
- -- longer necessary, because we now special-case this type in the
- -- compiler, so "=" composes properly for descendants of this
- -- type. Leaving it out is more efficient.
+ -- A previous version had a default initial value for Data, which is
+ -- no longer necessary, because we now special-case this type in the
+ -- compiler, so "=" composes properly for descendants of this type.
+ -- Leaving it out is more efficient.
end record;
- -- Wide_Wide_Bounded.Generic_Bounded_Length.Wide_Wide_Bounded_String is
- -- derived from this type, with the constraint of the maximum length.
-- The subprograms defined for Super_String are similar to those defined
-- for Bounded_Wide_Wide_String, except that they have different names, so
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, 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- --
Name_Len := K;
end Decode_Name_Buffer;
- -- Start of processing for Decode_Name_Buffer
+ -- Start of processing for Delete_SCIL_Files
begin
-- If parsing was not successful, no Main_Unit is available, so return
when N_Package_Body =>
Unit_Name := Corresponding_Spec (Main);
+ when N_Package_Renaming_Declaration =>
+ Unit_Name := Defining_Unit_Name (Main);
+
+ when N_Generic_Package_Declaration =>
+ -- No SCIL file generated for generic package declarations
+ return;
+
-- Should never happen, but can be ignored in production
when others =>
-- This is done unconditionally to ensure that tools can be linked
-- properly with user programs compiled with older language versions.
-- In addition, this is needed because "=" composes for bounded strings
- -- in all language versions (see also
- -- Exp_Ch4.Expand_Composite_Equality).
+ -- in all language versions (see Exp_Ch4.Expand_Composite_Equality).
elsif Comes_From_Source (Def_Id)
and then Convention (Def_Id) = Convention_Ada
Op : constant Node_Id := Find_Primitive_Eq;
begin
+ -- Use user-defined primitive if it exists, otherwise use
+ -- predefined equality.
+
if Present (Op) then
return Op;
else
-
- -- Use predefined equality if no user-defined primitive exists
-
return Make_Op_Eq (Loc, Lhs, Rhs);
end if;
end;
PR_SET_NAME : constant := 15;
function prctl
- (option : int; arg2, arg3, arg4, arg5 : unsigned_long := 0) return int;
+ (option : int;
+ arg2, arg3, arg4, arg5 : unsigned_long := 0) return int;
pragma Import (C, prctl);
-------------
------------------------------------------------------------------------------
-- Version used on OpenVMS systems, where Clock accuracy is too low for
--- RM A.5.2 (45).
+-- RM A.5.2(45).
with Interfaces; use Interfaces;
declare
Task_Name : String (1 .. Parameters.Max_Task_Image_Length + 1);
Result : int;
+
begin
-- Set thread name to ease debugging
Remove (Body_To_Analyze);
-- Keep separate checks needed when compiling without optimizations
- -- AAMP and VM targets have no support for inlining in the backend
- -- and hence we use frontend inlining at all optimization levels.
if Optimization_Level = 0
+
+ -- AAMP and VM targets have no support for inlining in the backend
+ -- and hence we use frontend inlining at all optimization levels.
+
or else AAMP_On_Target
or else VM_Target /= No_VM
then
-----------------------
function Is_Bounded_String (T : Entity_Id) return Boolean is
- -- Check whether T is ultimately derived from Ada.Strings.-
- -- Superbounded.Super_String, or one of the [Wide_]Wide_
- -- versions. This will be True for all the Bounded_String types in
- -- instances of the Generic_Bounded_Length generics, and for types
- -- derived from those.
-
Under : constant Entity_Id := Underlying_Type (Root_Type (T));
+
begin
- return Present (Under) and then
- (Is_RTE (Root_Type (Under), RO_SU_Super_String)
- or else Is_RTE (Root_Type (Under), RO_WI_Super_String)
- or else Is_RTE (Root_Type (Under), RO_WW_Super_String));
+ -- Check whether T is ultimately derived from Ada.Strings.Superbounded.
+ -- Super_String, or one of the [Wide_]Wide_ versions. This will
+ -- be True for all the Bounded_String types in instances of the
+ -- Generic_Bounded_Length generics, and for types derived from those.
+
+ return Present (Under)
+ and then (Is_RTE (Root_Type (Under), RO_SU_Super_String) or else
+ Is_RTE (Root_Type (Under), RO_WI_Super_String) or else
+ Is_RTE (Root_Type (Under), RO_WW_Super_String));
end Is_Bounded_String;
-----------------------------
function Must_Inline (Subp : Entity_Id) return Boolean is
begin
- -- AAMP and VM targets have no support for inlining in the backend.
- -- Hence we do as much inlining as possible in the front end.
-
return
(Optimization_Level = 0
- or else AAMP_On_Target
- or else VM_Target /= No_VM)
+
+ -- AAMP and VM targets have no support for inlining in the backend.
+ -- Hence we do as much inlining as possible in the front end.
+
+ or else AAMP_On_Target
+ or else VM_Target /= No_VM)
and then Has_Pragma_Inline (Subp)
and then (Has_Pragma_Inline_Always (Subp) or else Front_End_Inlining);
end Must_Inline;