summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_strm.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-07 13:59:41 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-07 13:59:41 +0000
commit9c7948d7a0a3e5f334d33429484856ff2d29f9e2 (patch)
tree5922899f31cfff187cacf2e6f7dd4da6e87ec94a /gcc/ada/exp_strm.adb
parente20c756c7a9b6ecbfc8ce0be8df0773e796370c0 (diff)
downloadgcc-9c7948d7a0a3e5f334d33429484856ff2d29f9e2.tar.gz
2014-11-07 Arnaud Charlet <charlet@adacore.com>
* debug.adb, snames.adb-tmpl (Is_Keyword_Name): Consider 'overriding' a keyword in Ada 95 mode when -gnatd.D is used. * gnat_ugn.texi: Document -gnatd.D. 2014-11-07 Vasiliy Fofanov <fofanov@adacore.com> * gnatls.adb: Lower severity of the program's return value in some common cases. 2014-11-07 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Decorate_Type): The limited view of a tagged type has an empty list of primitive operations. 2014-11-07 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): Update references to SPARK RM. (Process_Full_View): Update references to SPARK RM. * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Update references to SPARK RM. (Analyze_Subprogram_Body_Helper): Update references to SPARK RM. * sem_ch7.adb (Analyze_Package_Body_Helper): Update references to SPARK RM. * sem_prag.adb (Check_Ghost_Constituent): Update references to SPARK RM. * sem_res.adb (Check_Ghost_Policy): Update references to SPARK RM. (Resolve_Actuals): Ensure that the actual parameter of a Ghost subprogram whose formal is of mode IN OUT or OUT is Ghost. * sem_util.adb (Check_Ghost_Completion): Update references to SPARK RM. 2014-11-07 Ed Schonberg <schonberg@adacore.com> * exp_ch7.adb (Make_Final_Call): If type of designated object is derived from that of the formal of the Deep_Finalize procedure, add an unchecked conversion to prevent spurious type error. 2014-11-07 Robert Dewar <dewar@adacore.com> * table.adb, inline.adb, einfo.adb, gnat1drv.adb, exp_ch13.adb, exp_fixd.adb, prj-conf.adb, exp_strm.adb, a-cofove.adb, exp_ch3.ads: Minor reformatting. 2014-11-07 Robert Dewar <dewar@adacore.com> * sem_ch12.adb, sem_ch13.adb, prj-tree.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_strm.adb')
-rw-r--r--gcc/ada/exp_strm.adb52
1 files changed, 25 insertions, 27 deletions
diff --git a/gcc/ada/exp_strm.adb b/gcc/ada/exp_strm.adb
index da16134f0d2..ba0447f2820 100644
--- a/gcc/ada/exp_strm.adb
+++ b/gcc/ada/exp_strm.adb
@@ -1129,8 +1129,7 @@ package body Exp_Strm is
-- to construct.
if Has_Discriminants (Typ)
- and then
- No (Discriminant_Default_Value (First_Discriminant (Typ)))
+ and then No (Discriminant_Default_Value (First_Discriminant (Typ)))
and then not Is_Constrained (Underlying_Type (B_Typ))
then
Discr := First_Discriminant (B_Typ);
@@ -1148,7 +1147,7 @@ package body Exp_Strm is
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Cn),
- Object_Definition =>
+ Object_Definition =>
New_Occurrence_Of (Etype (Discr), Loc));
-- If this is an access discriminant, do not perform default
@@ -1163,9 +1162,9 @@ package body Exp_Strm is
Append_To (Decls, Decl);
Append_To (Decls,
Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Etype (Discr), Loc),
+ Prefix => New_Occurrence_Of (Etype (Discr), Loc),
Attribute_Name => Name_Read,
- Expressions => New_List (
+ Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Identifier (Loc, Cn))));
@@ -1195,7 +1194,7 @@ package body Exp_Strm is
Odef :=
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Occurrence_Of (B_Typ, Loc),
- Constraint =>
+ Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => Constr));
@@ -1264,11 +1263,9 @@ package body Exp_Strm is
-- because those are written by 'Write.
if Has_Discriminants (Typ)
- and then
- No (Discriminant_Default_Value (First_Discriminant (Typ)))
+ and then No (Discriminant_Default_Value (First_Discriminant (Typ)))
then
Disc := First_Discriminant (Typ);
-
while Present (Disc) loop
-- If the type is an unchecked union, it must have default
@@ -1287,10 +1284,10 @@ package body Exp_Strm is
Append_To (Stms,
Make_Attribute_Reference (Loc,
- Prefix =>
+ Prefix =>
New_Occurrence_Of (Stream_Base_Type (Etype (Disc)), Loc),
Attribute_Name => Name_Write,
- Expressions => New_List (
+ Expressions => New_List (
Make_Identifier (Loc, Name_S),
Disc_Ref)));
@@ -1300,9 +1297,9 @@ package body Exp_Strm is
Append_To (Stms,
Make_Attribute_Reference (Loc,
- Prefix => New_Occurrence_Of (Typ, Loc),
+ Prefix => New_Occurrence_Of (Typ, Loc),
Attribute_Name => Name_Write,
- Expressions => New_List (
+ Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Identifier (Loc, Name_V))));
@@ -1448,7 +1445,7 @@ package body Exp_Strm is
Append_To (Result,
Make_Case_Statement (Loc,
- Expression => D_Ref,
+ Expression => D_Ref,
Alternatives => Alts));
end if;
@@ -1485,10 +1482,9 @@ package body Exp_Strm is
return
Make_Attribute_Reference (Loc,
- Prefix =>
- New_Occurrence_Of (Field_Typ, Loc),
+ Prefix => New_Occurrence_Of (Field_Typ, Loc),
Attribute_Name => Nam,
- Expressions => New_List (
+ Expressions => New_List (
Make_Identifier (Loc, Name_S),
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_V),
@@ -1654,18 +1650,19 @@ package body Exp_Strm is
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_S),
- Parameter_Type =>
+ Parameter_Type =>
Make_Access_Definition (Loc,
Null_Exclusion_Present => True,
- Subtype_Mark => New_Occurrence_Of (
- Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc)))),
+ Subtype_Mark =>
+ New_Occurrence_Of
+ (Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc)))),
Result_Definition => New_Occurrence_Of (Typ, Loc));
Decl :=
Make_Subprogram_Body (Loc,
- Specification => Spec,
- Declarations => Decls,
+ Specification => Spec,
+ Declarations => Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stms));
@@ -1698,11 +1695,12 @@ package body Exp_Strm is
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_S),
- Parameter_Type =>
+ Parameter_Type =>
Make_Access_Definition (Loc,
Null_Exclusion_Present => True,
- Subtype_Mark => New_Occurrence_Of (
- Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))),
+ Subtype_Mark =>
+ New_Occurrence_Of
+ (Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))),
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
@@ -1711,8 +1709,8 @@ package body Exp_Strm is
Decl :=
Make_Subprogram_Body (Loc,
- Specification => Spec,
- Declarations => Empty_List,
+ Specification => Spec,
+ Declarations => Empty_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stms));