+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,
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);
-- 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
-- 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);
* Text Translation::
* Shared Files::
* Filenames encoding::
+* File content encoding::
* Open Modes::
* Operations on C Streams::
* Interfacing to C Streams::
* Text Translation::
* Shared Files::
* Filenames encoding::
+* File content encoding::
* Open Modes::
* Operations on C Streams::
* Interfacing to C Streams::
-- --
-- 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- --
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
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 :=
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;
-- 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)))