summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_strm.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 15:31:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 15:31:56 +0000
commit9eb919116e4eba4b38519ee961ebfa9bc3ac32cc (patch)
tree221b324fc246557794e1977bd63dc7c19d564aa1 /gcc/ada/exp_strm.adb
parentfe9fc6757e47fecf2bb25f018c0e0297370638d8 (diff)
downloadgcc-9eb919116e4eba4b38519ee961ebfa9bc3ac32cc.tar.gz
2011-08-04 Thomas Quinot <quinot@adacore.com>
* gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve the project path. 2011-08-04 Robert Dewar <dewar@adacore.com> * a-coinho.adb: Minor reformatting. 2011-08-04 Robert Dewar <dewar@adacore.com> * a-coinho.ads: Minor reformatting. 2011-08-04 Vadim Godunko <godunko@adacore.com> * s-atocou.ads, s-atocou.adb: New files. * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads, a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove direct use of GCC's atomic builtins and replace them by use of new atomic counter package. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * exp_strm.adb: better error message for No_Default_Stream_Attributes. 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic with a call to Get_External_Tag. * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on subprogram usage. Remove the guard against package declarations and bodies since Build_Cleanup_Statements is no longer invoked in that context. (Build_Components): Initialize Tagged_Type_Stmts when the context contains at least one library-level tagged type. (Build_Finalizer): New local variables Has_Tagged_Types and Tagged_Type_Stmts along with associated comments on usage. Update the logic to include tagged type processing. (Create_Finalizer): Insert all library-level tagged type unregistration code before the jump block circuitry. (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements. (Expand_N_Package_Declaration): Remove the call to Build_Cleanup_Statements. (Process_Tagged_Type_Declaration): New routine. Generate a call to unregister the external tag of a tagged type. (Processing_Actions): Reimplemented to handle tagged types. (Process_Declarations): Detect the declaration of a library-level tagged type and carry out the appropriate actions. (Unregister_Tagged_Types): Removed. The machinery has been directly merged with Build_Finalizer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_strm.adb')
-rw-r--r--gcc/ada/exp_strm.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/exp_strm.adb b/gcc/ada/exp_strm.adb
index f70ec41eac6..907c32add5c 100644
--- a/gcc/ada/exp_strm.adb
+++ b/gcc/ada/exp_strm.adb
@@ -25,6 +25,7 @@
with Atree; use Atree;
with Einfo; use Einfo;
+with Errout; use Errout;
with Exp_Util; use Exp_Util;
with Namet; use Namet;
with Nlists; use Nlists;
@@ -476,6 +477,15 @@ package body Exp_Strm is
begin
Check_Restriction (No_Default_Stream_Attributes, N);
+ if Restriction_Active (No_Default_Stream_Attributes) then
+ Error_Msg_NE
+ ("missing user-defined Input for type&", N, Etype (Targ));
+ if Nkind (Targ) = N_Selected_Component then
+ Error_Msg_NE
+ ("\which is a component of type&", N, Etype (Prefix (Targ)));
+ end if;
+ end if;
+
-- Check first for Boolean and Character. These are enumeration types,
-- but we treat them specially, since they may require special handling
-- in the transfer protocol. However, this special handling only applies
@@ -686,6 +696,15 @@ package body Exp_Strm is
begin
Check_Restriction (No_Default_Stream_Attributes, N);
+ if Restriction_Active (No_Default_Stream_Attributes) then
+ Error_Msg_NE
+ ("missing user-defined Write for type&", N, Etype (Item));
+ if Nkind (Item) = N_Selected_Component then
+ Error_Msg_NE
+ ("\which is a component of type&", N, Etype (Prefix (Item)));
+ end if;
+ end if;
+
-- Compute the size of the stream element. This is either the size of
-- the first subtype or if given the size of the Stream_Size attribute.