Commit 815839a3 by Arnaud Charlet

[multiple changes]

2013-10-10  Thomas Quinot  <quinot@adacore.com>

	* exp_ch4.adb (Process_Transient_Object): For any context other
	than a simple return statement, insert the finalization action
	after the context, not as an action on the context (which will
	get evaluated before it).

2013-10-10  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb (Write_Field19_Name): Correct the
	string name of attribute Default_Aspect_Value.

2013-10-10  Ed Schonberg  <schonberg@adacore.com>

	* sem_type.adb (Interface_Present_In_Ancestor): The progenitor
	in a type declaration may be an interface subtype.

2013-10-10  Robert Dewar  <dewar@adacore.com>

	* sinfo.ads (Do_Range_Check): Add special note on handling of
	range checks for Succ and Pred.

2013-10-10  Robert Dewar  <dewar@adacore.com>

	* erroutc.adb (Output_Msg_Text): Remove VMS special handling.

2013-10-10  Robert Dewar  <dewar@adacore.com>

	* a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
	(Is_Mark): New function.
	(Is_Other_Format): New function.
	(Is_Punctuation_Connector): New function.
	(Is_Space): New function.

From-SVN: r203370
parent 82893775
2013-10-10 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb (Process_Transient_Object): For any context other
than a simple return statement, insert the finalization action
after the context, not as an action on the context (which will
get evaluated before it).
2013-10-10 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Write_Field19_Name): Correct the
string name of attribute Default_Aspect_Value.
2013-10-10 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Interface_Present_In_Ancestor): The progenitor
in a type declaration may be an interface subtype.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sinfo.ads (Do_Range_Check): Add special note on handling of
range checks for Succ and Pred.
2013-10-10 Robert Dewar <dewar@adacore.com>
* erroutc.adb (Output_Msg_Text): Remove VMS special handling.
2013-10-10 Robert Dewar <dewar@adacore.com>
* a-chahan.ads, a-chahan.adb (Is_Line_Terminator): New function
(Is_Mark): New function.
(Is_Other_Format): New function.
(Is_Punctuation_Connector): New function.
(Is_Space): New function.
2013-10-10 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Redo duplicate/missing
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2013, 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- --
......@@ -49,6 +49,7 @@ package body Ada.Characters.Handling is
Hex_Digit : constant Character_Flags := 16;
Digit : constant Character_Flags := 32;
Special : constant Character_Flags := 64;
Line_Term : constant Character_Flags := 128;
Letter : constant Character_Flags := Lower or Upper;
Alphanum : constant Character_Flags := Letter or Digit;
......@@ -66,10 +67,10 @@ package body Ada.Characters.Handling is
BEL => Control,
BS => Control,
HT => Control,
LF => Control,
VT => Control,
FF => Control,
CR => Control,
LF => Control + Line_Term,
VT => Control + Line_Term,
FF => Control + Line_Term,
CR => Control + Line_Term,
SO => Control,
SI => Control,
......@@ -141,7 +142,7 @@ package body Ada.Characters.Handling is
BPH => Control,
NBH => Control,
Reserved_132 => Control,
NEL => Control,
NEL => Control + Line_Term,
SSA => Control,
ESA => Control,
HTS => Control,
......@@ -370,6 +371,15 @@ package body Ada.Characters.Handling is
return (Char_Map (Item) and Letter) /= 0;
end Is_Letter;
------------------------
-- Is_Line_Terminator --
------------------------
function Is_Line_Terminator (Item : Character) return Boolean is
begin
return (Char_Map (Item) and Line_Term) /= 0;
end Is_Line_Terminator;
--------------
-- Is_Lower --
--------------
......@@ -379,6 +389,43 @@ package body Ada.Characters.Handling is
return (Char_Map (Item) and Lower) /= 0;
end Is_Lower;
-------------
-- Is_Mark --
-------------
function Is_Mark (Item : Character) return Boolean is
pragma Unreferenced (Item);
begin
return False;
end Is_Mark;
---------------------
-- Is_Other_Format --
---------------------
function Is_Other_Format (Item : Character) return Boolean is
begin
return Item = Soft_Hyphen;
end Is_Other_Format;
------------------------------
-- Is_Punctuation_Connector --
------------------------------
function Is_Punctuation_Connector (Item : Character) return Boolean is
begin
return Item = '_';
end Is_Punctuation_Connector;
--------------
-- Is_Space --
--------------
function Is_Space (Item : Character) return Boolean is
begin
return Item = ' ' or else Item = No_Break_Space;
end Is_Space;
----------------
-- Is_Special --
----------------
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
......@@ -42,18 +42,23 @@ package Ada.Characters.Handling is
-- Character Classification Functions --
----------------------------------------
function Is_Control (Item : Character) return Boolean;
function Is_Graphic (Item : Character) return Boolean;
function Is_Letter (Item : Character) return Boolean;
function Is_Lower (Item : Character) return Boolean;
function Is_Upper (Item : Character) return Boolean;
function Is_Basic (Item : Character) return Boolean;
function Is_Digit (Item : Character) return Boolean;
function Is_Decimal_Digit (Item : Character) return Boolean
function Is_Control (Item : Character) return Boolean;
function Is_Graphic (Item : Character) return Boolean;
function Is_Letter (Item : Character) return Boolean;
function Is_Lower (Item : Character) return Boolean;
function Is_Upper (Item : Character) return Boolean;
function Is_Basic (Item : Character) return Boolean;
function Is_Digit (Item : Character) return Boolean;
function Is_Decimal_Digit (Item : Character) return Boolean
renames Is_Digit;
function Is_Hexadecimal_Digit (Item : Character) return Boolean;
function Is_Alphanumeric (Item : Character) return Boolean;
function Is_Special (Item : Character) return Boolean;
function Is_Hexadecimal_Digit (Item : Character) return Boolean;
function Is_Alphanumeric (Item : Character) return Boolean;
function Is_Special (Item : Character) return Boolean;
function Is_Line_Terminator (Item : Character) return Boolean;
function Is_Mark (Item : Character) return Boolean;
function Is_Other_Format (Item : Character) return Boolean;
function Is_Punctuation_Connector (Item : Character) return Boolean;
function Is_Space (Item : Character) return Boolean;
---------------------------------------------------
-- Conversion Functions for Character and String --
......@@ -129,22 +134,27 @@ package Ada.Characters.Handling is
(Item : String) return Wide_String;
private
pragma Inline (Is_Alphanumeric);
pragma Inline (Is_Basic);
pragma Inline (Is_Character);
pragma Inline (Is_Control);
pragma Inline (Is_Digit);
pragma Inline (Is_Graphic);
pragma Inline (Is_Hexadecimal_Digit);
pragma Inline (Is_ISO_646);
pragma Inline (Is_Letter);
pragma Inline (Is_Line_Terminator);
pragma Inline (Is_Lower);
pragma Inline (Is_Upper);
pragma Inline (Is_Basic);
pragma Inline (Is_Digit);
pragma Inline (Is_Hexadecimal_Digit);
pragma Inline (Is_Alphanumeric);
pragma Inline (Is_Mark);
pragma Inline (Is_Other_Format);
pragma Inline (Is_Punctuation_Connector);
pragma Inline (Is_Space);
pragma Inline (Is_Special);
pragma Inline (To_Lower);
pragma Inline (To_Upper);
pragma Inline (Is_Upper);
pragma Inline (To_Basic);
pragma Inline (Is_ISO_646);
pragma Inline (Is_Character);
pragma Inline (To_Character);
pragma Inline (To_Lower);
pragma Inline (To_Upper);
pragma Inline (To_Wide_Character);
end Ada.Characters.Handling;
......@@ -8741,7 +8741,7 @@ package body Einfo is
Write_Str ("Corresponding_Discriminant");
when Scalar_Kind =>
Write_Str ("Default_Value");
Write_Str ("Default_Aspect_Value");
when E_Array_Type =>
Write_Str ("Default_Component_Value");
......
......@@ -12402,15 +12402,7 @@ package body Exp_Ch4 is
Name => New_Reference_To (Temp_Id, Loc),
Expression => Make_Null (Loc))));
-- Use the Actions list of logical operators when inserting the
-- finalization call. This ensures that all transient controlled
-- objects are finalized after the operators are evaluated.
if Nkind_In (Context, N_And_Then, N_Or_Else) then
Insert_Action (Context, Fin_Call);
else
Insert_Action_After (Context, Fin_Call);
end if;
Insert_Action_After (Context, Fin_Call);
end if;
end Process_Transient_Object;
......
......@@ -2611,8 +2611,13 @@ package body Sem_Type is
begin
AI := First (Interface_List (Parent (Target_Typ)));
-- The progenitor itself may be a subtype of an interface type.
while Present (AI) loop
if Etype (AI) = Iface_Typ then
if Etype (AI) = Iface_Typ
or else Base_Type (Etype (AI)) = Iface_Typ
then
return True;
elsif Present (Interfaces (Etype (AI)))
......
......@@ -934,6 +934,14 @@ package Sinfo is
-- listed above (e.g. in a return statement), an additional type
-- conversion node is introduced to represent the required check.
-- A special case arises for the arguments of the Pred/Succ attributes.
-- Here the range check needed is against First + 1 .. Last (Pred) or
-- First .. Last - 1 (Succ). Essentially these checks are what would be
-- performed within the implicit body of the functions that correspond
-- to these attributes. In these cases, the Do_Range check flag is set
-- on the argument to the attribute function, and the back end must
-- special case the appropriate range to check against.
-- Do_Storage_Check (Flag17-Sem)
-- This flag is set in an N_Allocator node to indicate that a storage
-- check is required for the allocation, or in an N_Subprogram_Body node
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment