From beaa97abbff424d43e37b2efee127499386ad0ad Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 12 Apr 2013 15:31:37 +0200 Subject: [PATCH] [multiple changes] 2013-04-12 Ed Schonberg * sem_attr.adb (Check_Stream_Attribute): If restriction No_Default_Stream_Attributes is active, it is illegal to use a predefined elementary type stream attribute either by itself, or more importantly as part of the attribute subprogram for a composite type. However, if the broader restriction No_Streams is active, then stream operations are not generated, and there is no error. 2013-04-12 Robert Dewar * gnatbind.adb: Minor reformatting. From-SVN: r197914 --- gcc/ada/ChangeLog | 14 ++++++++++++++ gcc/ada/gnatbind.adb | 3 +++ gcc/ada/sem_attr.adb | 8 ++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9c04df5c293..4e3e9f21dcc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2013-04-12 Ed Schonberg + + * sem_attr.adb (Check_Stream_Attribute): If restriction + No_Default_Stream_Attributes is active, it is illegal to use a + predefined elementary type stream attribute either by itself, + or more importantly as part of the attribute subprogram for a + composite type. However, if the broader restriction No_Streams + is active, then stream operations are not generated, and there + is no error. + +2013-04-12 Robert Dewar + + * gnatbind.adb: Minor reformatting. + 2013-04-12 Bob Duff * sem_attr.adb (Analyze_Access_Attribute): Treat P'Access like a diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb index b332b13b85a..63e7c142cee 100644 --- a/gcc/ada/gnatbind.adb +++ b/gcc/ada/gnatbind.adb @@ -176,6 +176,9 @@ procedure Gnatbind is Max_Storage_At_Blocking => True, -- Not checkable at compile time + -- The following three should not be partition-wide, so the + -- following tests are junk to be removed eventually ??? + No_Specification_Of_Aspect => True, -- Requires a parameter value, not a count diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 770be4e811f..a71cdd1bb8e 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -1746,9 +1746,13 @@ package body Sem_Attr is -- AI05-0057: if restriction No_Default_Stream_Attributes is active, -- it is illegal to use a predefined elementary type stream attribute -- either by itself, or more importantly as part of the attribute - -- subprogram for a composite type. + -- subprogram for a composite type. However, if the broader + -- restriction No_Streams is active, stream operations are not + -- generated, and there is no error. - if Restriction_Active (No_Default_Stream_Attributes) then + if Restriction_Active (No_Default_Stream_Attributes) + and then not Restriction_Active (No_Streams) + then declare T : Entity_Id; -- 2.30.2