mirror of git://gcc.gnu.org/git/gcc.git
sem_res.adb: Minor fix to error message text.
2013-10-14 Robert Dewar <dewar@adacore.com> * sem_res.adb: Minor fix to error message text. * errout.ads, erroutc.ads: Minor reformatting. * s-ststop.ads, s-stratt.ads: Clean up documentation of block IO mode for streams. * s-stratt-xdr.adb: Minor comment update. From-SVN: r203559
This commit is contained in:
parent
43dbd3e338
commit
2590ef129b
|
|
@ -1,3 +1,11 @@
|
||||||
|
2013-10-14 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* sem_res.adb: Minor fix to error message text.
|
||||||
|
* errout.ads, erroutc.ads: Minor reformatting.
|
||||||
|
* s-ststop.ads, s-stratt.ads: Clean up documentation of block IO
|
||||||
|
mode for streams.
|
||||||
|
* s-stratt-xdr.adb: Minor comment update.
|
||||||
|
|
||||||
2013-10-14 Robert Dewar <dewar@adacore.com>
|
2013-10-14 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
* sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
|
* sem_aux.adb, sem_aux.ads, sem_prag.adb: Minor reformatting.
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,8 @@ package Errout is
|
||||||
-- taken as an Ada reserved word, and are converted to the default
|
-- taken as an Ada reserved word, and are converted to the default
|
||||||
-- case for reserved words (see Scans package spec). Surrounding
|
-- case for reserved words (see Scans package spec). Surrounding
|
||||||
-- quotes are added unless manual quotation mode is currently set.
|
-- quotes are added unless manual quotation mode is currently set.
|
||||||
|
-- RM and SPARK are special exceptions, they are never treated as
|
||||||
|
-- keywords, and just appear verbatim, with no surrounding quotes.
|
||||||
|
|
||||||
-- Insertion character ` (Backquote: set manual quotation mode)
|
-- Insertion character ` (Backquote: set manual quotation mode)
|
||||||
-- The backquote character always appears in pairs. Each backquote of
|
-- The backquote character always appears in pairs. Each backquote of
|
||||||
|
|
|
||||||
|
|
@ -427,7 +427,8 @@ package Erroutc is
|
||||||
-- Handle reserved word insertion (upper case letters). The Text argument
|
-- Handle reserved word insertion (upper case letters). The Text argument
|
||||||
-- is the current error message input text, and J is an index which on
|
-- is the current error message input text, and J is an index which on
|
||||||
-- entry points to the first character of the reserved word, and on exit
|
-- entry points to the first character of the reserved word, and on exit
|
||||||
-- points past the last character of the reserved word.
|
-- points past the last character of the reserved word. Note that RM and
|
||||||
|
-- SPARK are treated specially and not considered to be keywords.
|
||||||
|
|
||||||
procedure Set_Msg_Insertion_Run_Time_Name;
|
procedure Set_Msg_Insertion_Run_Time_Name;
|
||||||
-- If package System contains a definition for Run_Time_Name (see package
|
-- If package System contains a definition for Run_Time_Name (see package
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 1996-2012, Free Software Foundation, Inc. --
|
-- Copyright (C) 1996-2013, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GARLIC is free software; you can redistribute it and/or modify it under --
|
-- GARLIC 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
|
@ -283,6 +283,10 @@ package body System.Stream_Attributes is
|
||||||
-- Block_IO_OK --
|
-- Block_IO_OK --
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
-- We must inhibit Block_IO, because in XDR mode, each element is output
|
||||||
|
-- according to XDR requirements, which is not at all the same as writing
|
||||||
|
-- the whole array in one block.
|
||||||
|
|
||||||
function Block_IO_OK return Boolean is
|
function Block_IO_OK return Boolean is
|
||||||
begin
|
begin
|
||||||
return False;
|
return False;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 1992-2010, 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 --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
|
@ -88,7 +88,6 @@ package System.Stream_Attributes is
|
||||||
-- the first subtype is specified, or where an enumeration representation
|
-- the first subtype is specified, or where an enumeration representation
|
||||||
-- clause is given, these three types are treated like any other cases
|
-- clause is given, these three types are treated like any other cases
|
||||||
-- of enumeration types, as described above.
|
-- of enumeration types, as described above.
|
||||||
-- for
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
-- Input Functions --
|
-- Input Functions --
|
||||||
|
|
@ -114,8 +113,8 @@ package System.Stream_Attributes is
|
||||||
function I_SF (Stream : not null access RST) return Short_Float;
|
function I_SF (Stream : not null access RST) return Short_Float;
|
||||||
function I_SI (Stream : not null access RST) return Short_Integer;
|
function I_SI (Stream : not null access RST) return Short_Integer;
|
||||||
function I_SSI (Stream : not null access RST) return Short_Short_Integer;
|
function I_SSI (Stream : not null access RST) return Short_Short_Integer;
|
||||||
function I_SSU (Stream : not null access RST)
|
function I_SSU (Stream : not null access RST) return
|
||||||
return UST.Short_Short_Unsigned;
|
UST.Short_Short_Unsigned;
|
||||||
function I_SU (Stream : not null access RST) return UST.Short_Unsigned;
|
function I_SU (Stream : not null access RST) return UST.Short_Unsigned;
|
||||||
function I_U (Stream : not null access RST) return UST.Unsigned;
|
function I_U (Stream : not null access RST) return UST.Unsigned;
|
||||||
function I_WC (Stream : not null access RST) return Wide_Character;
|
function I_WC (Stream : not null access RST) return Wide_Character;
|
||||||
|
|
@ -125,10 +124,10 @@ package System.Stream_Attributes is
|
||||||
-- Output Procedures --
|
-- Output Procedures --
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
-- Procedures for S'Write attribute. These procedures are also used
|
-- Procedures for S'Write attribute. These procedures are also used for
|
||||||
-- for 'Output, since for elementary types there is no difference
|
-- 'Output, since for elementary types there is no difference between
|
||||||
-- between 'Write and 'Output because there are no discriminants
|
-- 'Write and 'Output because there are no discriminants or bounds to
|
||||||
-- or bounds to be written.
|
-- be written.
|
||||||
|
|
||||||
procedure W_AD (Stream : not null access RST; Item : Fat_Pointer);
|
procedure W_AD (Stream : not null access RST; Item : Fat_Pointer);
|
||||||
procedure W_AS (Stream : not null access RST; Item : Thin_Pointer);
|
procedure W_AS (Stream : not null access RST; Item : Thin_Pointer);
|
||||||
|
|
@ -140,17 +139,15 @@ package System.Stream_Attributes is
|
||||||
procedure W_LI (Stream : not null access RST; Item : Long_Integer);
|
procedure W_LI (Stream : not null access RST; Item : Long_Integer);
|
||||||
procedure W_LLF (Stream : not null access RST; Item : Long_Long_Float);
|
procedure W_LLF (Stream : not null access RST; Item : Long_Long_Float);
|
||||||
procedure W_LLI (Stream : not null access RST; Item : Long_Long_Integer);
|
procedure W_LLI (Stream : not null access RST; Item : Long_Long_Integer);
|
||||||
procedure W_LLU (Stream : not null access RST;
|
procedure W_LLU (Stream : not null access RST; Item :
|
||||||
Item : UST.Long_Long_Unsigned);
|
UST.Long_Long_Unsigned);
|
||||||
procedure W_LU (Stream : not null access RST; Item : UST.Long_Unsigned);
|
procedure W_LU (Stream : not null access RST; Item : UST.Long_Unsigned);
|
||||||
procedure W_SF (Stream : not null access RST; Item : Short_Float);
|
procedure W_SF (Stream : not null access RST; Item : Short_Float);
|
||||||
procedure W_SI (Stream : not null access RST; Item : Short_Integer);
|
procedure W_SI (Stream : not null access RST; Item : Short_Integer);
|
||||||
procedure W_SSI (Stream : not null access RST;
|
procedure W_SSI (Stream : not null access RST; Item : Short_Short_Integer);
|
||||||
Item : Short_Short_Integer);
|
procedure W_SSU (Stream : not null access RST; Item :
|
||||||
procedure W_SSU (Stream : not null access RST;
|
UST.Short_Short_Unsigned);
|
||||||
Item : UST.Short_Short_Unsigned);
|
procedure W_SU (Stream : not null access RST; Item : UST.Short_Unsigned);
|
||||||
procedure W_SU (Stream : not null access RST;
|
|
||||||
Item : UST.Short_Unsigned);
|
|
||||||
procedure W_U (Stream : not null access RST; Item : UST.Unsigned);
|
procedure W_U (Stream : not null access RST; Item : UST.Unsigned);
|
||||||
procedure W_WC (Stream : not null access RST; Item : Wide_Character);
|
procedure W_WC (Stream : not null access RST; Item : Wide_Character);
|
||||||
procedure W_WWC (Stream : not null access RST; Item : Wide_Wide_Character);
|
procedure W_WWC (Stream : not null access RST; Item : Wide_Wide_Character);
|
||||||
|
|
@ -160,7 +157,7 @@ package System.Stream_Attributes is
|
||||||
-- distributed with GNAT, and s-stratt-xdr.adb, which is based on the XDR
|
-- distributed with GNAT, and s-stratt-xdr.adb, which is based on the XDR
|
||||||
-- standard. Both bodies share the same spec. The role of this function is
|
-- standard. Both bodies share the same spec. The role of this function is
|
||||||
-- to indicate whether the current version of System.Stream_Attributes
|
-- to indicate whether the current version of System.Stream_Attributes
|
||||||
-- supports block IO.
|
-- supports block IO. See System.Strings.Stream_Ops (s-ststop) for details.
|
||||||
|
|
||||||
private
|
private
|
||||||
pragma Inline (I_AD);
|
pragma Inline (I_AD);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
-- --
|
-- --
|
||||||
-- S p e c --
|
-- S p e c --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 2009, Free Software Foundation, Inc. --
|
-- Copyright (C) 2009-2013, Free Software Foundation, Inc. --
|
||||||
-- --
|
-- --
|
||||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
-- 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- --
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||||
|
|
@ -30,22 +30,33 @@
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- This package provides subprogram implementations of stream attributes for
|
-- This package provides subprogram implementations of stream attributes for
|
||||||
-- the following types:
|
-- the following types using a "block IO" approach in which the entire data
|
||||||
|
-- item is written in one operation, instead of writing individual characters.
|
||||||
|
|
||||||
-- Ada.String
|
-- Ada.String
|
||||||
-- Ada.Wide_String
|
-- Ada.Wide_String
|
||||||
-- Ada.Wide_Wide_String
|
-- Ada.Wide_Wide_String
|
||||||
--
|
|
||||||
-- The compiler will generate references to the subprograms in this package
|
-- The compiler will generate references to the subprograms in this package
|
||||||
-- when expanding stream attributes for the above mentioned types. Example:
|
-- when expanding stream attributes for the above mentioned types. Example:
|
||||||
--
|
|
||||||
-- String'Output (Some_Stream, Some_String);
|
-- String'Output (Some_Stream, Some_String);
|
||||||
--
|
|
||||||
-- will be expanded into:
|
-- will be expanded into:
|
||||||
--
|
|
||||||
-- String_Output (Some_Stream, Some_String);
|
-- String_Output (Some_Stream, Some_String);
|
||||||
-- or
|
-- or
|
||||||
-- String_Output_Blk_IO (Some_Stream, Some_String);
|
-- String_Output_Blk_IO (Some_Stream, Some_String);
|
||||||
|
|
||||||
|
-- This expansion occurs only if System.Stream_Attributes.Block_IO_OK returns
|
||||||
|
-- True, indicating that this approach is compatible with the expectations of
|
||||||
|
-- System.Stream_Attributes. For the default implementation of this package,
|
||||||
|
-- there is no difference between writing the elements one by one using the
|
||||||
|
-- default output routine for the element type and writing the whole array
|
||||||
|
-- using block IO.
|
||||||
|
|
||||||
|
-- In addition,
|
||||||
|
|
||||||
pragma Compiler_Unit;
|
pragma Compiler_Unit;
|
||||||
|
|
||||||
with Ada.Streams;
|
with Ada.Streams;
|
||||||
|
|
|
||||||
|
|
@ -3634,7 +3634,7 @@ package body Sem_Res is
|
||||||
then
|
then
|
||||||
Error_Msg_N
|
Error_Msg_N
|
||||||
("conversion between unrelated limited array types "
|
("conversion between unrelated limited array types "
|
||||||
& "not allowed (\A\I-00246)", A);
|
& "not allowed ('A'I-00246)", A);
|
||||||
|
|
||||||
if Is_Limited_Type (Etype (F)) then
|
if Is_Limited_Type (Etype (F)) then
|
||||||
Explain_Limited_Type (Etype (F), A);
|
Explain_Limited_Type (Etype (F), A);
|
||||||
|
|
@ -3666,8 +3666,8 @@ package body Sem_Res is
|
||||||
then
|
then
|
||||||
New_Itype := Create_Itype (E_Anonymous_Access_Type, A);
|
New_Itype := Create_Itype (E_Anonymous_Access_Type, A);
|
||||||
Set_Etype (New_Itype, Etype (A));
|
Set_Etype (New_Itype, Etype (A));
|
||||||
Set_Directly_Designated_Type (New_Itype,
|
Set_Directly_Designated_Type
|
||||||
Directly_Designated_Type (Etype (A)));
|
(New_Itype, Directly_Designated_Type (Etype (A)));
|
||||||
Set_Etype (A, New_Itype);
|
Set_Etype (A, New_Itype);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
@ -3768,10 +3768,10 @@ package body Sem_Res is
|
||||||
Resolve (A, Etype (F));
|
Resolve (A, Etype (F));
|
||||||
end if;
|
end if;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
-- Not a synchronized operation
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
-- not a synchronized operation.
|
|
||||||
|
|
||||||
Resolve (A, Etype (F));
|
Resolve (A, Etype (F));
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
|
@ -3939,8 +3939,9 @@ package body Sem_Res is
|
||||||
(Is_Invariant_Procedure (Current_Scope)
|
(Is_Invariant_Procedure (Current_Scope)
|
||||||
or else Is_Predicate_Function (Current_Scope))
|
or else Is_Predicate_Function (Current_Scope))
|
||||||
then
|
then
|
||||||
Error_Msg_N ("function used in predicate cannot " &
|
Error_Msg_N
|
||||||
"modify its argument", F);
|
("function used in predicate cannot "
|
||||||
|
& "modify its argument", F);
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
@ -4188,12 +4189,14 @@ package body Sem_Res is
|
||||||
Eval_Actual (A);
|
Eval_Actual (A);
|
||||||
|
|
||||||
-- If it is a named association, treat the selector_name as a
|
-- If it is a named association, treat the selector_name as a
|
||||||
-- proper identifier, and mark the corresponding entity. Ignore
|
-- proper identifier, and mark the corresponding entity.
|
||||||
-- this reference in SPARK mode, as it refers to an entity not in
|
|
||||||
-- scope at the point of reference, so the reference should be
|
|
||||||
-- ignored for computing effects of subprograms.
|
|
||||||
|
|
||||||
if Nkind (Parent (A)) = N_Parameter_Association
|
if Nkind (Parent (A)) = N_Parameter_Association
|
||||||
|
|
||||||
|
-- Ignore reference in SPARK mode, as it refers to an entity not
|
||||||
|
-- in scope at the point of reference, so the reference should
|
||||||
|
-- be ignored for computing effects of subprograms.
|
||||||
|
|
||||||
and then not SPARK_Mode
|
and then not SPARK_Mode
|
||||||
then
|
then
|
||||||
Set_Entity (Selector_Name (Parent (A)), F);
|
Set_Entity (Selector_Name (Parent (A)), F);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue