summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_strm.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:58:31 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:58:31 +0000
commitcb7509d243f2e888c5e916d0d4696eb775da445d (patch)
treeb0583d9634094585ba692565803e8e16f9710b93 /gcc/ada/exp_strm.adb
parent3cd4d7efbcbc94794a1ae218440503bb9358f45d (diff)
downloadgcc-cb7509d243f2e888c5e916d0d4696eb775da445d.tar.gz
2005-11-14 Javier Miranda <miranda@adacore.com>
* exp_strm.adb (Build_Stream_Attr_Profile, Build_Stream_Function, Build_Stream_Procedure): Add the null-excluding attribute to the first formal. This has no semantic meaning under Ada95 mode but it is a requirement under Ada05 mode. * par-ch3.adb (P_Access_Definition): Addition of warning message if the null exclusion is used under Ada95 mode (P_Null_Exclusion): The qualifier has no semantic meaning in Ada 95. (P_Access_Definition): Remove assertion that forbids the use of the null-exclusion feature in Ada95. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_strm.adb')
-rw-r--r--gcc/ada/exp_strm.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/exp_strm.adb b/gcc/ada/exp_strm.adb
index f6e5d5c61ad..84b321e924c 100644
--- a/gcc/ada/exp_strm.adb
+++ b/gcc/ada/exp_strm.adb
@@ -1447,11 +1447,15 @@ package body Exp_Strm is
Profile : List_Id;
begin
+ -- (Ada 2005: AI-441): Set the null-excluding attribute because it has
+ -- no semantic meaning in Ada 95 but it is a requirement in Ada2005.
+
Profile := New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_S),
Parameter_Type =>
Make_Access_Definition (Loc,
+ Null_Exclusion_Present => True,
Subtype_Mark => New_Reference_To (
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))));
@@ -1483,6 +1487,9 @@ package body Exp_Strm is
begin
-- Construct function specification
+ -- (Ada 2005: AI-441): Set the null-excluding attribute because it has
+ -- no semantic meaning in Ada 95 but it is a requirement in Ada2005.
+
Spec :=
Make_Function_Specification (Loc,
Defining_Unit_Name => Fnam,
@@ -1492,6 +1499,7 @@ package body Exp_Strm is
Defining_Identifier => Make_Defining_Identifier (Loc, Name_S),
Parameter_Type =>
Make_Access_Definition (Loc,
+ Null_Exclusion_Present => True,
Subtype_Mark => New_Reference_To (
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc)))),
@@ -1523,6 +1531,9 @@ package body Exp_Strm is
begin
-- Construct procedure specification
+ -- (Ada 2005: AI-441): Set the null-excluding attribute because it has
+ -- no semantic meaning in Ada 95 but it is a requirement in Ada2005.
+
Spec :=
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Pnam,
@@ -1532,6 +1543,7 @@ package body Exp_Strm is
Defining_Identifier => Make_Defining_Identifier (Loc, Name_S),
Parameter_Type =>
Make_Access_Definition (Loc,
+ Null_Exclusion_Present => True,
Subtype_Mark => New_Reference_To (
Class_Wide_Type (RTE (RE_Root_Stream_Type)), Loc))),