diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 17:44:22 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-04 17:44:22 +0200 |
commit | 276e7ed0242aaa390159bb8e2e3b57f70face83a (patch) | |
tree | 537a6ead5cdb714a61faecd070db42dccac0e0d7 /gcc/ada/sem_util.ads | |
parent | 19172ae9356891e93e2a9bb8641a7796f4d962b0 (diff) | |
download | gcc-276e7ed0242aaa390159bb8e2e3b57f70face83a.zip gcc-276e7ed0242aaa390159bb8e2e3b57f70face83a.tar.gz gcc-276e7ed0242aaa390159bb8e2e3b57f70face83a.tar.bz2 |
[multiple changes]
2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
whether a type lacks user-defined Read or Write operations, or has a
component that lacks them.
* sem_attr.adb (Check_Stream_Attribute): if restriction
No_Default_Stream_Attributes is active, verify that all subcomponent
types of the target have user-defined stream operations, and report
error otherwise.
* exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
* exp_strm.adb: Build_Elementary_Input_Call,
Build_Elementary_Write_Call): remove checks for restriction
No_Default_Stream_Attributes, now checked in semantics.
2011-08-04 Vincent Celier <celier@adacore.com>
* prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
switches on the command line, look for all valid --RTS switches in the
Builder switches and for each language use the first runtime name found
to invoke gprconfig.
(Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
command line and there is no auto-configuration.
(Runtime_Name_Set_For): New function.
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Object_Declarations): Do not generate the
elaborate initialization expression for variable Abort when processing
a package body or a declaration.
(Create_Finalizer): Propagate the package context when creating the
exception-related variables.
* exp_ch7.ads (Build_Object_Declarations): New formal parameter
For_Package along with usage comment.
From-SVN: r177407
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 5078b3a..ae04cc4 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -26,6 +26,7 @@ -- Package containing utility procedures used throughout the semantics with Einfo; use Einfo; +with Exp_Tss; use Exp_Tss; with Namet; use Namet; with Nmake; use Nmake; with Snames; use Snames; @@ -1377,6 +1378,16 @@ package Sem_Util is function Type_Access_Level (Typ : Entity_Id) return Uint; -- Return the accessibility level of Typ + function Type_Without_Stream_Operation + (T : Entity_Id; Op : TSS_Name_Type := TSS_Null) return Entity_Id; + -- AI05-0161 : if the restriction No_Default_Stream_Attributes is active + -- then we cannot generate stream subprograms for composite types with + -- elementary subcomponents that lack user-defined stream subprograms. + -- This predicate determines whether a type has such an elementary + -- subcomponent. If Op is TSS_Null, a type that lacks either Read or Write + -- prevents the construction of a composite stream operation. If Op is + -- specified we check only for the given stream operation. + function Unique_Defining_Entity (N : Node_Id) return Entity_Id; -- Return the entity which represents declaration N, so that matching -- declaration and body have the same entity. |