[multiple changes]
2014-07-18 Gary Dismukes <dismukes@adacore.com> * sem_util.adb: Minor typo correction. 2014-07-18 Ben Brosgol <brosgol@adacore.com> * gnat_rm.texi: Complete previous change. 2014-07-18 Pascal Obry <obry@adacore.com> * s-fileio.adb: Minor style fix. 2014-07-18 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper specification of stream attributes for subtypes that are not first subtypes, to prevent malformed rep_item chains in the case of such illegal specifications for discriminated private subtypes. (Check_Overloaded_Name): Verify that the name is an entity name before other checks. 2014-07-18 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_fputwc) Do not disable on cross-build. From-SVN: r212807
This commit is contained in:
parent
50ea63572d
commit
c74afd846d
|
@ -1,3 +1,28 @@
|
|||
2014-07-18 Gary Dismukes <dismukes@adacore.com>
|
||||
|
||||
* sem_util.adb: Minor typo correction.
|
||||
|
||||
2014-07-18 Ben Brosgol <brosgol@adacore.com>
|
||||
|
||||
* gnat_rm.texi: Complete previous change.
|
||||
|
||||
2014-07-18 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* s-fileio.adb: Minor style fix.
|
||||
|
||||
2014-07-18 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
|
||||
specification of stream attributes for subtypes that are not
|
||||
first subtypes, to prevent malformed rep_item chains in the case
|
||||
of such illegal specifications for discriminated private subtypes.
|
||||
(Check_Overloaded_Name): Verify that the name is an entity name
|
||||
before other checks.
|
||||
|
||||
2014-07-18 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* adaint.c (__gnat_fputwc) Do not disable on cross-build.
|
||||
|
||||
2014-07-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sem_prag.adb, sem_attr.adb,
|
||||
|
|
|
@ -855,7 +855,7 @@ __gnat_rmdir (char *path)
|
|||
int
|
||||
__gnat_fputwc(int c, FILE *stream)
|
||||
{
|
||||
#if ! defined (__vxworks) && ! defined (IS_CROSS)
|
||||
#if ! defined (__vxworks)
|
||||
return fputwc ((wchar_t)c, stream);
|
||||
#else
|
||||
return fputc (c, stream);
|
||||
|
|
|
@ -64,9 +64,9 @@
|
|||
-- and fully analyzed (possibly with expansion) during the semantic
|
||||
-- analysis of subprogram bodies.
|
||||
|
||||
with Namet; use Namet;
|
||||
with Snames; use Snames;
|
||||
with Types; use Types;
|
||||
with Namet; use Namet;
|
||||
with Snames; use Snames;
|
||||
with Types; use Types;
|
||||
|
||||
package Aspects is
|
||||
|
||||
|
@ -205,10 +205,14 @@ package Aspects is
|
|||
-- The following array indicates aspects that accept 'Class
|
||||
|
||||
Class_Aspect_OK : constant array (Aspect_Id) of Boolean :=
|
||||
(Aspect_Invariant => True,
|
||||
(Aspect_Input => True,
|
||||
Aspect_Invariant => True,
|
||||
Aspect_Output => True,
|
||||
Aspect_Pre => True,
|
||||
Aspect_Predicate => True,
|
||||
Aspect_Post => True,
|
||||
Aspect_Read => True,
|
||||
Aspect_Write => True,
|
||||
Aspect_Type_Invariant => True,
|
||||
others => False);
|
||||
|
||||
|
|
|
@ -502,6 +502,7 @@ The Implementation of Standard I/O
|
|||
* Text Translation::
|
||||
* Shared Files::
|
||||
* Filenames encoding::
|
||||
* File content encoding::
|
||||
* Open Modes::
|
||||
* Operations on C Streams::
|
||||
* Interfacing to C Streams::
|
||||
|
@ -17288,6 +17289,7 @@ these additional facilities are also described in this chapter.
|
|||
* Text Translation::
|
||||
* Shared Files::
|
||||
* Filenames encoding::
|
||||
* File content encoding::
|
||||
* Open Modes::
|
||||
* Operations on C Streams::
|
||||
* Interfacing to C Streams::
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2014, 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- --
|
||||
|
@ -763,7 +763,7 @@ package body System.File_IO is
|
|||
while Index < Form'Last loop
|
||||
Index := Index + 1;
|
||||
|
||||
-- Loop through the RMS Keys and dispatch.
|
||||
-- Loop through the RMS Keys and dispatch
|
||||
|
||||
for Key in RMS_Keys loop
|
||||
declare
|
||||
|
|
|
@ -1683,6 +1683,22 @@ package body Sem_Ch13 is
|
|||
Set_Never_Set_In_Source (E, False);
|
||||
end if;
|
||||
|
||||
-- Correctness of the profile of a stream operation is
|
||||
-- verified at the freeze point, but we must detect the
|
||||
-- illegal specification of this aspect for a subtype now,
|
||||
-- to prevent malformed rep_item chains.
|
||||
|
||||
if (A_Id = Aspect_Input
|
||||
or else A_Id = Aspect_Output
|
||||
or else A_Id = Aspect_Read
|
||||
or else A_Id = Aspect_Write)
|
||||
and not Is_First_Subtype (E)
|
||||
then
|
||||
Error_Msg_N
|
||||
("local name must be a first subtype", Aspect);
|
||||
goto Continue;
|
||||
end if;
|
||||
|
||||
-- Construct the attribute definition clause
|
||||
|
||||
Aitem :=
|
||||
|
@ -8095,7 +8111,8 @@ package body Sem_Ch13 is
|
|||
procedure Check_Overloaded_Name is
|
||||
begin
|
||||
if not Is_Overloaded (End_Decl_Expr) then
|
||||
Err := Entity (End_Decl_Expr) /= Entity (Freeze_Expr);
|
||||
Err := not Is_Entity_Name (End_Decl_Expr)
|
||||
or else Entity (End_Decl_Expr) /= Entity (Freeze_Expr);
|
||||
|
||||
else
|
||||
Err := True;
|
||||
|
|
|
@ -3477,8 +3477,8 @@ package body Sem_Util is
|
|||
|
||||
-- In Ada 2012, If the type has an incomplete partial view, there
|
||||
-- may be primitive operations declared before the full view, so
|
||||
-- we need to start scanning from the the incomplete view, which
|
||||
-- is earlier on the entity chain.
|
||||
-- we need to start scanning from the incomplete view, which is
|
||||
-- earlier on the entity chain.
|
||||
|
||||
elsif Nkind (Parent (B_Type)) = N_Full_Type_Declaration
|
||||
and then Present (Incomplete_View (Parent (B_Type)))
|
||||
|
|
Loading…
Reference in New Issue