[multiple changes]

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.

From-SVN: r185141
This commit is contained in:
Arnaud Charlet 2012-03-09 15:50:48 +01:00
parent ea3a4ad0a3
commit a1fc903a3f
12 changed files with 73 additions and 44 deletions

View File

@ -1,3 +1,18 @@
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

View File

@ -41,16 +41,17 @@ with Ada.Strings.Maps;
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

View File

@ -44,16 +44,17 @@ package Ada.Strings.Wide_Superbounded is
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

View File

@ -45,16 +45,17 @@ package Ada.Strings.Wide_Wide_Superbounded is
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

View File

@ -6,7 +6,7 @@
-- --
-- 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- --
@ -477,7 +477,7 @@ package body Comperr is
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
@ -499,6 +499,13 @@ package body Comperr is
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 =>

View File

@ -6116,8 +6116,7 @@ package body Exp_Ch3 is
-- 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

View File

@ -2504,12 +2504,12 @@ package body Exp_Ch4 is
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;

View File

@ -258,7 +258,8 @@ package System.OS_Interface is
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);
-------------

View File

@ -30,7 +30,7 @@
------------------------------------------------------------------------------
-- 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;

View File

@ -771,6 +771,7 @@ package body System.Task_Primitives.Operations is
declare
Task_Name : String (1 .. Parameters.Max_Task_Image_Length + 1);
Result : int;
begin
-- Set thread name to ease debugging

View File

@ -4888,10 +4888,12 @@ package body Sem_Ch6 is
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

View File

@ -6751,18 +6751,18 @@ package body Sem_Util is
-----------------------
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;
-----------------------------
@ -9422,13 +9422,14 @@ package body Sem_Util is
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;