diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-26 10:42:13 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-26 10:42:13 +0000 |
commit | a39f1c9d98c82f70175088911d5096365efaa480 (patch) | |
tree | 70c781e7f9e0b3989847ce98520d13a3cf176d39 /gcc/ada/sem_aggr.adb | |
parent | db77fe17b1e55336955cea4bbec2f4e312671f96 (diff) | |
download | gcc-a39f1c9d98c82f70175088911d5096365efaa480.tar.gz |
2004-07-26 Arnaud Charlet <charlet@act-europe.fr>
* sem_util.adb (Requires_Transient_Scope): Temporarily disable
optimization, not supported by the tree-ssa back-end.
2004-07-26 Olivier Hainque <hainque@act-europe.fr>
* s-mastop-irix.adb: Update comments.
* a-except.adb (Exception_Information): Raise Constraint_Error if
exception Id is Null_Id.
This is required behavior, which is more reliably and clearly checked
at the top level interface level.
2004-07-26 Javier Miranda <miranda@gnat.com>
* exp_aggr.adb (Build_Array_Aggr_Code): Do not build the initialization
call if a component has no default_expression and the box is used.
* sem_aggr.adb (Resolve_Array_Aggregate): If a component has no
default_expression and you use box, it behaves as if you had declared a
stand-alone object.
(Resolve_Record_Aggregate): If a component has no default_expression and
you use box, it behaves as if you had declared a stand-alone object.
* sem_ch10.adb (Install_Siblings): Do not make visible the private
entities of private-with siblings.
2004-07-26 Ed Schonberg <schonberg@gnat.com>
* sem_ch3.adb (Build_Underlying_Full_View): If this is the full view
for a component of an itype, set the parent pointer for analysis,
there is no list in which to insert it.
* sem_res.adb (Resolve): Call Rewrite_Renamed_Operator only for
bona-fide renamings, not for inherited operations.
* exp_ch4.adb (Expand_Allocator_Expression): If the allocator is an
actual for a formal that is an access parameter, create local
finalization list even if the expression is not an aggregate.
2004-07-26 Ed Schonberg <schonberg@gnat.com>
PR ada/16213
* sem_ch8.adb (Attribute_Renaming, Check_Library_Level_Renaming):
Diagnose properly illegal subprogram renamings that are library units.
2004-07-26 Ed Schonberg <schonberg@gnat.com>
PR ada/15588
* sem_util.adb (Is_OK_Variable_For_Out_Formal): If actual is a type
conversion rewritten as an unchecked conversion, check that original
expression is a variable.
* exp_ch4.adb (Expand_N_Type_Conversion): If rewriting as an
unchecked_conversion, create new node rather than rewriting in place,
to preserve original construct.
2004-07-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gigi.h (gnat_expand_body): Deleted.
* Make-lang.in: (trans.o): Depends on function.h.
* misc.c: (gnat_expand_body): Moved to here.
* trans.c (gnat_expand_body_1): Deleted.
(gnat_expand_body): Moved from here.
(gnat_to_gnu): N_Implicit_Label_Declaration forces being in elab proc.
(add_stmt): Check for marked visited with global_bindings_p.
(gnat_gimplify_expr, case COMPONENT_REF): New case.
(gnat_gimplify_expr, case NULL_EXPR): Set TREE_NO_WARNING for temp.
* utils2.c (build_binary_op, case MODIFY_EXPR): Put LHS in a
VIEW_CONVERT_EXPR if not operation type.
* utils.c (update_pointer_to): Set DECL_ORIGINAL_FIELD for
fat pointer.
* decl.c, cuintp.c, gigi.h, misc.c, trans.c, utils.c, utils2.c: Minor
changes: reformatting of negation operators, removing unneeded
inequality comparison with zero, converting equality comparisons with
zero to negations, changing int/0/1 to bool/false/true, replace calls
to gigi_abort with abort, and various other similar changes.
2004-07-26 Vincent Celier <celier@gnat.com>
* gnatcmd.adb (GNATCmd): Add processing for new built-in command
"setup".
* make.adb (Gnatmake): Fail when a library is not present and there is
no object directory.
* mlib-prj.adb (Check_Library): No need to check if the library needs
to be rebuilt if there is no object directory, hence no object files
to build the library.
* opt.ads (Setup_Projects): New Boolean flag.
* prj-nmsc.adb (Locate_Directory): New parameter Project, Kind and
Location.
Create directory when Kind /= "" and in "gnat setup". Report error if
directory cannot be created.
(Ada_Check): Create library interface copy dir if it does not exist
and we are in "gnat setup".
(Find_Sources): No error if in "gnat setup" and no Ada sources were
found.
(Language_Independent_Check): Create object directory, exec directory
and/or library directory if they do not exist and we are in
"gnat setup".
* vms_conv.ads: (Command_Type): New command Setup.
* vms_conv.adb (Initialize): Add Setup component of Cammand_List.
* vms_data.ads: Add qualifiers/switches for new built-in command
"setup".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 1e27760a04a..44c80e0910f 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -29,7 +29,6 @@ with Checks; use Checks; with Einfo; use Einfo; with Elists; use Elists; with Errout; use Errout; -with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; with Freeze; use Freeze; with Itypes; use Itypes; @@ -1684,15 +1683,7 @@ package body Sem_Aggr is -- of a component the expander will generate calls to -- the corresponding initialization subprogram. - if Present (Base_Init_Proc (Etype (Component_Typ))) - or else Has_Task (Base_Type (Component_Typ)) - then - null; - else - Error_Msg_N - ("(Ada 2005): no value supplied for this component", - Assoc); - end if; + null; elsif not Resolve_Aggr_Expr (Expression (Assoc), Single_Elmt => Single_Choice) @@ -1831,13 +1822,7 @@ package body Sem_Aggr is -- of a component the expander will generate calls to -- the corresponding initialization subprogram. - if Present (Base_Init_Proc (Etype (Component_Typ))) then - null; - else - Error_Msg_N - ("(Ada 2005): no value supplied for these components", - Assoc); - end if; + null; elsif not Resolve_Aggr_Expr (Expression (Assoc), Single_Elmt => False) @@ -2965,20 +2950,24 @@ package body Sem_Aggr is Component := Node (Component_Elmt); Expr := Get_Value (Component, Component_Associations (N), True); - if Mbox_Present and then Is_Limited_Type (Etype (Component)) then - - -- Ada 2005 (AI-287): In case of default initialization of - -- a limited component we pass the limited component to - -- the expander. The expander will generate calls to the - -- corresponding initialization subprograms. + -- Ada 2005 (AI-287): Default initialized limited component are + -- passed to the expander, that will generate calls to the + -- corresponding IP. + if Mbox_Present and then Is_Limited_Type (Etype (Component)) then Add_Association (Component => Component, Expr => Empty, Box_Present => True); + -- Ada 2005 (AI-287): No value supplied for component + + elsif Mbox_Present and No (Expr) then + null; + elsif No (Expr) then Error_Msg_NE ("no value supplied for component &!", N, Component); + else Resolve_Aggr_Expr (Expr, Component); end if; |