aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/aspects.ads
AgeCommit message (Collapse)AuthorFilesLines
2011-08-02[multiple changes]Arnaud Charlet1-98/+101
2011-08-02 Robert Dewar <dewar@adacore.com> * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor reformatting. 2011-08-02 Robert Dewar <dewar@adacore.com> * aspects.adb: New aspects Default_Value and Default_Component_Value New format of Aspect_Names table checks for omitted entries * aspects.ads: Remove mention of Aspect_Cancel and add documentation on handling of boolean aspects for derived types. New aspects Default_Value and Default_Component_Value New format of Aspect_Names table checks for omitted entries * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag (Has_Default_Value): New flag (Has_Default_Component_Value): New flag (Has_Default_Value): New flag * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names table. * par-prag.adb: New pragmas Default_Value and Default_Component_Value * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects Default_Value and Default_Component_Value * sem_prag.adb: New pragmas Default_Value and Default_Component_Value New aspects Default_Value and Default_Component_Value * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value * sprint.adb: Print N_Aspect_Specification node when called from gdb 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds. Minor reformatting. 2011-08-02 Robert Dewar <dewar@adacore.com> * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM From-SVN: r177110
2011-08-02[multiple changes]Arnaud Charlet1-3/+5
2011-08-02 Robert Dewar <dewar@adacore.com> * sem_ch8.adb, aspects.ads: Minor reformatting. 2011-08-02 Eric Botcazou <ebotcazou@adacore.com> * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline. * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure extracted from... (Analyze_Aspect_Specifications): ...here. Call above procedure. From-SVN: r177094
2011-08-01[multiple changes]Arnaud Charlet1-2/+41
2011-08-01 Robert Dewar <dewar@adacore.com> * par-endh.adb: Minor reformatting. 2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add aspects for library unit pragmas (Pre_Post_Aspects): New subtype. * par-ch12.adb (P_Generic): New syntax for aspects in packages * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter * par-ch7.adb (P_Package): Remove Decl parameter (P_Package): Handle new syntax for aspects (before IS) * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle new aspect syntax (P_Task_Definition): Remove Decl parameter, handle new aspect syntax * par.adb (P_Aspect_Specifications): Add Semicolon parameter (P_Package): Remove Decl parameter * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit aspects * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect specs * sem_util.ads, sem_util.adb (Static_Boolean): New function * sinfo.ads: Document new syntax for aspects in packages etc. * sprint.adb: Handle new syntax of aspects before IS in package 2011-08-01 Thomas Quinot <quinot@adacore.com> * atree.ads: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-01 Robert Dewar <dewar@adacore.com> * exp_util.adb (Insert_Actions): Fix error in handling Actions for case expr alternative. 2011-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Fix typo. From-SVN: r177027
2011-08-01[multiple changes]Arnaud Charlet1-2/+65
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec. * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name. * par.adb: Add with for Namet.Sp. * par-tchk.adb: Minor reformatting. 2011-08-01 Vincent Celier <celier@adacore.com> * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name of the init procedure of a SAL. * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name): New procedure. 2011-08-01 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor reformatting. 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * adaint.c (__gnat_file_time_name_attr): Get rid of warning. 2011-08-01 Thomas Quinot <quinot@adacore.com> * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function conformant with its spec (return True only for types that have an overriding Initialize primitive operation that prevents them from having preelaborable initialization). * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable initialization for controlled types in Ada 2005 or later mode. From-SVN: r177021
2011-08-01aspects.ads, [...]: Add aspect Type_Invariant, Precondition, Postcondition.Robert Dewar1-27/+38
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition, Postcondition. (Same_Aspect): New function. * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect Type_Invariant, Precondition, Postcondition. * snames.ads-tmpl: Add Name_Type_Invariant. From-SVN: r177011
2011-08-01aspects.ads, [...]: Add Static_Predicate and Dynamic_Predicate.Robert Dewar1-1/+5
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate. * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for Static_Predicate and Dynamic_Predicate. (Build_Predicate_Function): Add processing for Static_Predicate and Dynamic_Predicate. * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag (From_Static_Predicate): New flag * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate 2011-08-01 Robert Dewar <dewar@adacore.com> * usage.adb: Documentation cleanup for Ada version modes in usage. * expander.adb: Minor reformatting. From-SVN: r177009
2011-08-01[multiple changes]Arnaud Charlet1-43/+37
2011-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads (Boolean_Aspects): New subtype. * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects for derived types in cases where the parent type and derived type have aspects. * freeze.adb (Freeze_Entity): Fix problems in handling derived type with aspects when parent type also has aspects. (Freeze_Entity): Deal with delay of boolean aspects (must evaluate boolean expression at this point). * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in accordance with final decision on the Ada 2012 feature. * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag. 2011-08-01 Matthew Heaney <heaney@adacore.com> * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector. From-SVN: r177005
2010-12-20Fix typos in gcc/ada.Ralf Wildenhues1-3/+3
gcc/ada/: * projects.texi: Fix typos. * gnat_rm.texi: Likewise. * gnat_ugn.texi: Likewise. * sem_util.adb: Fix typo in variable, typos in comments. * a-btgbso.adb: Fix typos in comments. * a-cbdlli.adb, a-cbhase.ads, a-cdlili.adb, a-cobove.adb, a-coinve.adb, a-convec.adb, a-direct.ads, a-strunb-shared.adb, a-strunb-shared.ads, a-stuten.ads, a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads, a-suenco.adb, a-suenst.adb, a-suewst.adb, a-suezst.adb, ali.ads, aspects.ads, atree.ads, binde.adb, bindgen.adb, checks.adb, checks.ads, einfo.ads, err_vars.ads, errout.adb, errout.ads, exp_aggr.adb, exp_attr.adb, exp_cg.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_dbug.ads, exp_disp.adb, exp_fixd.ads, freeze.adb, g-altive.ads, g-comlin.ads, g-excact.ads, g-mbdira.adb, g-sechas.ads, g-sehash.ads, g-sha1.ads, g-sha224.ads, g-sha256.ads, g-sha384.ads, g-sha512.ads, g-shsh32.ads, g-shsh64.ads, g-socket.adb, g-socket.ads, g-sothco.ads, gcc-interface/decl.c, gcc-interface/trans.c, gcc-interface/utils2.c, gnat1drv.adb, init.c, inline.adb, link.c, locales.c, make.adb, mingw32.h, namet.ads, osint.adb, par-ch12.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-prag.adb, par.adb, par_sco.adb, prepcomp.adb, prj-conf.ads, prj-dect.adb, prj-env.adb, prj-env.ads, prj-nmsc.adb, prj-tree.ads, prj-util.ads, prj.adb, prj.ads, s-auxdec-vms-alpha.adb, s-auxdec-vms_64.ads, s-oscons-tmplt.c, s-osinte-vxworks.ads, s-osprim-mingw.adb, s-regexp.adb, s-stusta.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, scn.adb, scos.ads, sem.adb, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb, sem_disp.ads, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_scil.adb, sem_util.ads, sem_warn.adb, sem_warn.ads, sinfo.ads, socket.c, styleg.adb, switch.ads, sysdep.c, tb-alvxw.c, xoscons.adb: Likewise. From-SVN: r168082
2010-10-18[multiple changes]Arnaud Charlet1-2/+10
2010-10-18 Arnaud Charlet <charlet@adacore.com> * g-comlin.adb (Get_Switches): Prevent dereferencing null Config. 2010-10-18 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add entries for aspects Read/Write/Input/Output. * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for handling aspects Read/Write/Input/Output. 2010-10-18 Robert Dewar <dewar@adacore.com> * sem_util.adb (Note_Possible_Modification): Do not give warning for use of pragma Unmodified unless we are sure this is a modification. 2010-10-18 Tristan Gingold <gingold@adacore.com> * sysdep.c: Add __gnat_get_stack_bounds. * s-taprop-mingw.adb Call __gnat_get_stack_bounds to set Pri_Stack_Info. 2010-10-18 Robert Dewar <dewar@adacore.com> * a-assert.ads: Fix bad name in header. * sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch10.adb: Minor reformatting. * exp_aggr.adb: Fix typo in comment. From-SVN: r165615
2010-10-12[multiple changes]Arnaud Charlet1-0/+6
2010-10-12 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb (Move_Aspects): New procedure. * atree.ads, atree.adb: (New_Copy): Does not copy aspect specifications * sinfo.ads, par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-endh.adb, par-ch13.adb, par-ch12.adb: Modify grammar to include aspect specifications. Recognize aspect specifications for all cases * par.adb: Recognize aspect specifications for all cases * sem_ch12.ads, sem_ch12.adb (Copy_Generic_Node): Copies aspect specifications. * sem_ch3.adb (Analyze_Subtype_Declaration): Improve patch to freeze generic actual types (was missing some guards before). * sem_ch9.adb (Analyze_Single_Protected_Declaration): Copy aspects to generated object (Analyze_Single_Task_Declaration): Copy aspects to generated object 2010-10-12 Eric Botcazou <ebotcazou@adacore.com> * usage.adb (usage): Adjust line for -gnatn switch. 2010-10-12 Robert Dewar <dewar@adacore.com> * sem_attr.adb (Eval_Attribute): Only leave change active for aspect spec case. 2010-10-12 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Declaration): If this is a declaration of a null procedure resolve the types of the profile of the generated null body now. From-SVN: r165353
2010-10-11[multiple changes]Arnaud Charlet1-14/+24
2010-10-11 Robert Dewar <dewar@adacore.com> * g-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.adb (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable * s-htable.ads (Get_First): New procedural version for Simple_HTable (Get_Next): New procedural version for Simple_HTable 2010-10-11 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Propagate_Discriminants): To gather the components of a variant part, use the association list of the subaggregate, which already includes the values of the needed discriminants. 2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Changes to accomodate aspect delay (Tree_Write): New procedure. * atree.ads, atree.adb: Flag3 is now Has_Aspects and applies to all nodes. * atree.h: Flag3 is now Has_Aspects and applies to all nodes * debug.adb: Add debug flag gnatd.A * einfo.adb (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * einfo.ads (Has_Delayed_Aspects): New flag (Get_Rep_Item_For_Entity): New function * exp_ch13.adb (Expand_N_Freeze_Entity): Insert delayed aspects into tree. * exp_ch3.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb: New calling sequence for Freeze_Entity. * freeze.ads, freeze.adb (Freeze_Entity): Takes node rather than source ptr. All calls are changed to this new interface. (Freeze_And_Append): Same change (Freeze_Entity): Evaluate deferred aspects * sem_attr.adb: New calling sequence for Freeze_Entity (Eval_Attribute): Don't try to evaluate attributes of unfrozen types when we are in spec expression preanalysis mode. * sem_ch10.adb: New calling sequence for Freeze_Entity * sem_ch11.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch12.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch13.adb (Analyze_Aspect_Specifications): Major rewrite to accomodate delaying aspect evaluation to the freeze point. (Duplicate_Clause): Simplify using Get_Rep_Item_For_Entity, and also accomodate delayed aspects. (Rep_Item_Too_Late): Deal with delayed aspects case * sem_ch13.ads (Rep_Item_Too_Late): Document handling of delayed aspects * sem_ch3.adb (Analyze_Subtype_Declaration): Make sure that generic actual types are properly frozen (this is needed because of the new check in Eval_Attribute that declines to evaluate attributes for unfrozen types). Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). * sem_ch3.ads (Preanalyze_Spec_Expression): Note use for delayed aspects * sem_ch5.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity. * sem_ch9.adb, sem_ch7.adb, sem_ch6.adb: Simplify analysis of aspect specifications now that the flag Has_Aspects applies to all nodes (no need to save aspects). New calling sequence for Freeze_Entity * sem_prag.adb (Check_Duplicate_Pragma): Simplify using Get_Rep_Item_For_Entity (Get_Pragma_Arg): Moved to Sinfo * sinfo.ads, sinfo.adb (Aspect_Rep_Item_: New field (Is_Delayed_Aspect): New flag (Next_Rep_Item): Document use for aspects (Get_Pragma_Arg): Moved here from Sem_Prag * sprint.adb (Sprint_Aspect_Specifications): Now called after semicolon is output and removes semicolon (simplifies interface). (Sprint_Node_Actual): Simplify handling of aspects now that Has_Aspects applies to any node. * tree_gen.adb: Write contents of Aspect_Specifications hash table * tree_in.adb: Read and initialize Aspect_Specifications hash table * treepr.adb (Print_Node): Print Has_Aspects flag (Print_Node): Print Aspect_Specifications in Has_Aspects set * xtreeprs.adb: Remove obsolete references to Flag1,2,3 From-SVN: r165300
2010-10-11[multiple changes]Arnaud Charlet1-21/+54
2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Major revision of this package for 2nd stage of aspects implementation. * gcc-interface/Make-lang.in: Add entry for aspects.o * gcc-interface/Makefile.in: Add aspects.o to GNATMAKE_OBJS * par-ch13.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * par-ch3.adb (P_Type_Declaration): Handle aspect specifications (P_Derived_Type_Def_Or_Private_Ext_Decl): Handle aspect specifications (P_Identifier_Declarations): Handle aspect specifications (P_Component_Items): Handle aspect specifications (P_Subtype_Declaration): Handle aspect specifications * par-ch6.adb (P_Subprogram): Handle aspect specifications * par-ch9.adb (P_Entry_Declaration): Handle aspect specifications * par.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * sem.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_cat.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch11.adb (Analyze_Exception_Declaration): Analyze aspect specifications. * sem_ch12.adb (Analyze_Formal_Object_Declaration): Handle aspect specifications. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Package_Declaration): Handle aspect specifications (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): Handle aspect specifications (Analyze_Formal_Type_Declaration): Handle aspect specifications (Analyze_Generic_Package_Declaration): Handle aspect specifications (Analyze_Generic_Subprogram_Declaration): Handle aspect specifications (Analyze_Package_Instantiation): Handle aspect specifications (Analyze_Subprogram_Instantiation): Handle aspect specifications * sem_ch12.ads (Analyze_Formal_Package_Declaration): New name (add _Declaration). (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) * sem_ch13.adb (Analyze_Aspect_Specifications): New procedure (Duplicate_Clause): New function, calls to this function are added to processing for all aspects. * sem_ch13.ads (Analyze_Aspect_Specifications): New procedure * sem_ch3.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch3.ads (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Analyze aspect specifications. (Analyze_Subprogram_Declaration): Analyze aspect specifications * sem_ch7.adb (Analyze_Package_Declaration): Analyze aspect specifications. (Analyze_Private_Type_Declaration): Analyze aspect specifications * sem_ch9.adb (Analyze_Protected_Type_Declaration): Analyze aspect specifications. (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): Analyze aspect specifications (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): Analyze aspect specifications (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): Analyze aspect specifications (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_ch9.ads (Analyze_Protected_Type_Declaration): New name (add _Declaration). (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_prag.adb: Use Get_Pragma_Arg systematically so that we do not have to generate unnecessary pragma argument associations (this matches the doc). Throughout do changes to accomodate aspect specifications, including specializing messages, handling the case of not going through all homonyms, and allowing for cancellation. * sinfo.ads, sinfo.adb: Clean up obsolete documentation for Flag1,2,3 (Aspect_Cancel): New flag (From_Aspect_Specification): New flag (First_Aspect): Removed flag (Last_Aspect): Removed flag * sprint.adb (Sprint_Aspect_Specifications): New procedure (Sprint_Node_Actual): Add calls to Sprint_Aspect_Specifications 2010-10-11 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Actuals): Minor change to warning messages so they match in Ada 95, 2005, and 2012 modes, in the case where the language didn't change. Same thing for the run-time exception message. 2010-10-11 Javier Miranda <miranda@adacore.com> * debug.adb Document that switch -gnatd.p enables the CIL verifier. 2010-10-11 Robert Dewar <dewar@adacore.com> * s-htable.adb: Minor reformatting. From-SVN: r165299
2010-10-11[multiple changes]Arnaud Charlet1-0/+161
2010-10-11 Robert Dewar <dewar@adacore.com> * sem_prag.adb, sem_aggr.adb, sprint.adb: Minor reformatting. 2010-10-11 Javier Miranda <miranda@adacore.com> * exp_ch5.ads, exp_ch6.ads (Expand_N_Extended_Return_Statement): Moved to exp_ch6. (Expand_N_Simple_Return_Statement): Moved to exp_ch6. * exp_ch5.adb, exp_ch6.adb (Expand_Non_Function_Return): Moved to exp_ch6. (Expand_Simple_Function_Return): Move to exp_ch6. (Expand_N_Extended_Return_Statement): Moved to exp_ch6. (Expand_N_Simple_Return_Statement): Moved to exp_ch6. 2010-10-11 Robert Dewar <dewar@adacore.com> * snames.ads-tmpl: Add names for aspects. * aspects.ads, aspects.adb: New. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r165281