exp_smem.adb, [...]: Remove OK_For_Stream flag, not used, not needed.

2005-03-08  Robert Dewar  <dewar@adacore.com>

	* exp_smem.adb, sem_attr.adb: Remove OK_For_Stream flag, not used,
	not needed.
	Add documentation to replace the use of this flag
	Fix kludge for Maximum_Alignment on x86 so that it does not apply to
	the x86_64.

From-SVN: r96496
This commit is contained in:
Robert Dewar 2005-03-15 17:01:34 +01:00 committed by Arnaud Charlet
parent b7cdaf8d70
commit 4ee27193ec
2 changed files with 9 additions and 8 deletions

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2000 Free Software Foundation, Inc. --
-- Copyright (C) 1998-2005 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- --
@ -344,8 +344,6 @@ package body Exp_Smem is
New_Reference_To (S, Loc),
New_Occurrence_Of (Ent, Loc)));
Set_OK_For_Stream (Atr, True);
Insert_After_And_Analyze (N,
Make_Subprogram_Body (Loc,
Specification =>
@ -408,8 +406,6 @@ package body Exp_Smem is
New_Reference_To (S, Loc),
New_Occurrence_Of (Ent, Loc)));
Set_OK_For_Stream (Atr, True);
Insert_After_And_Analyze (N,
Make_Subprogram_Body (Loc,
Specification =>

View File

@ -1244,7 +1244,8 @@ package body Sem_Attr is
Btyp := Implementation_Base_Type (P_Type);
-- Stream attributes not allowed on limited types unless the
-- special OK_For_Stream flag is set.
-- stream attribute was generated by the expander (in which
-- case the underlying type will be used, as described in Sinfo).
if Is_Limited_Type (P_Type)
and then Comes_From_Source (N)
@ -1460,10 +1461,14 @@ package body Sem_Attr is
-- There is no clean way to check this. That's not surprising,
-- the front end should not be doing this kind of test ???. The
-- way we do it is test for either "86" or "pentium" being in
-- the string for the target name.
-- the string for the target name. However, we need to exclude
-- x86_64 for this check.
for J in T'First .. T'Last - 1 loop
if T (J .. J + 1) = "86"
if (T (J .. J + 1) = "86"
and then
(J + 4 > T'Last
or else T (J + 2 .. J + 4) /= "_64"))
or else (J <= T'Last - 6
and then T (J .. J + 6) = "pentium")
then