aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch6.adb
AgeCommit message (Collapse)AuthorFilesLines
2015-11-12[multiple changes]Arnaud Charlet1-1/+1
2015-11-12 Gary Dismukes <dismukes@adacore.com> * exp_ch5.adb, sem_ch3.adb, exp_util.ads, inline.adb, freeze.adb, sem_util.adb, sem_util.ads, par-ch6.adb, sem_elab.adb: Minor reformatting and a typo fix. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Preanalyze_Actuals): Add guard on use of Incomplete_Actuals, which are only stored for a package instantiation, in order to place the instance in the body of the enclosing unit. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * exp_intr.adb: Add legality checks on calls to a Generic_Dispatching_Constructor: the given tag must be defined, it cannot be the tag of an abstract type, and its accessibility level must not be greater than that of the constructor. 2015-11-12 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Container_Indexing, Constant_Indexing_OK): If the context is an overloaded call, assume that Constant_Indexing is not OK if an interpretation has an assignable parameter corresponding to the indexing expression. 2015-11-12 Jerome Lambourg <lambourg@adacore.com> * init.c (__gnat_error_handler): Force the SPE bit of the MSR when executing on e500v2 CPU. 2015-11-12 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Constituent): Stop the analysis after detecting a misplaced constituent as this is a critical error. From-SVN: r230239
2015-10-20sem_aggr.adb, [...]: Fix typos.Arnaud Charlet1-1/+1
2015-10-20 Arnaud Charlet <charlet@adacore.com> * sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb, freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb, par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb, sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix typos. From-SVN: r229074
2014-10-17sem_ch3.adb, [...]: Minor reformatting.Robert Dewar1-3/+10
2014-10-17 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, a-strsea.adb: Minor reformatting. * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures. From-SVN: r216375
2014-02-19[multiple changes]Arnaud Charlet1-14/+15
2014-02-19 Robert Dewar <dewar@adacore.com> * par-ch6.adb (P_Return): For extended return, end column lines up with RETURN. * par.adb: Minor documentation clarification. 2014-02-19 Yannick Moy <moy@adacore.com> * sem_prag.adb (Check_Loop_Pragma_Placement): Add check that Loop_Invariant and Loop_Variant appear consecutively. * gnat_rm.texi Update documentation of Loop_Invariant and Loop_Variant pragmas. 2014-02-19 Robert Dewar <dewar@adacore.com> * debug.adb: Document -gnatd.X. * par-ch5.adb (P_If_Statement): Always check THEN, even if not first token (Check_Then_Column): Ditto. * styleg.adb (Check_Then): Allow THEN on line after IF. (Check_Then): Check THEN placement under control of -gnatd.X * styleg.ads (Check_Then): Now called even if THEN is not first token on line. * stylesw.ads (Style_Check_If_Then_Layout): Document new relaxed rules. * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF. 2014-02-19 Robert Dewar <dewar@adacore.com> * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb, a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb, prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb, vms_conv.adb: Fix bad layout of IF statements From-SVN: r207893
2014-01-29a-except-2005.adb, [...]: Minor reformatting.Robert Dewar1-3/+3
2014-01-29 Robert Dewar <dewar@adacore.com> * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb, ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads, a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads, a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb, atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb, a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb, cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb, eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb, freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb, gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads, krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads, live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb, par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb, rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb, s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads, sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb, s-regpat.adb, s-secsta.adb, s-stalib.ads, s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb, s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb, s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads, system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb, urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting. From-SVN: r207260
2013-10-10[multiple changes]Arnaud Charlet1-3/+0
2013-10-10 Robert Dewar <dewar@adacore.com> * par-ch6.adb (Check_Junk_Semicolon_Before_Return): Remove junk code. 2013-10-10 Javier Miranda <miranda@adacore.com> * sem_ch13.adb (Freeze_Entity_Checks): Avoid loosing errors on CPP entities in -gnatc mode. 2013-10-10 Robert Dewar <dewar@adacore.com> * sem_ch5.adb (Analyze_If_Statement): Only diagnose redundant if from source. 2013-10-10 Robert Dewar <dewar@adacore.com> * restrict.adb (Check_SPARK_Restriction): Refine test (don't automatically go to the original node). * sem_ch11.adb (Analyze_Raise_Statement): Only raise statements that come from source violate SPARK restrictions. (Analyze_Raise_xxx_Error): Same fix. * sem_ch3.adb (Analyze_Object_Declaration): Check OK SPARK initialization on original node, not on possibly rewritten expression. * sem_ch4.adb (Analyze_If_Expression): Only if expressions that come from source violate SPARK mode restrictions. 2013-10-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Fix confusing documentation for -gnatyM. From-SVN: r203374
2013-09-10[multiple changes]Arnaud Charlet1-7/+4
2013-09-10 Robert Dewar <dewar@adacore.com> * sinput.adb (Check_For_BOM): Avoid reading past end of file. 2013-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Ada_2012_Feature): New procedure. * errout.ads (Error_Msg_Ada_2012_Feature): New procedure. * inline.ads: Save/Restore Ada_Version_Pragma. * opt.adb: Save/Restore Ada_Version_Pragma. * opt.ads (Ada_Version_Pragma): New variable. * par-ch11.adb, par-ch12.adb, par-ch13.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch8.adb, par-prag.adb: Use Error_Msg_Ada_2012_Feature. * prj.adb: Initialize Ada_Version_Pragma. * sem_attr.adb: Use Error_Msg_Ada_2012_Feature. * sem_ch12.adb, sem_ch8.adb: Save/restore Ada_Version_Pragma. * sem_prag.adb (Analyze_Pragma, cases Ada_xx): Set Ada_Version_Pragma. * switch-c.adb: Initialize Ada_Version_Pragma. * sem_ch12.adb: Minor reformatting. 2013-09-10 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Process_Subtype): Discard constraint on access to class-wide type. Such constraints are not supported and are considered a language pathology. From-SVN: r202466
2013-09-10[multiple changes]Arnaud Charlet1-12/+15
2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb: Add entries in the Has_Aspect_Specifications_Flag table for package body and body stubs. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * aspects.ads (Move_Aspects): Update comment on usage. (Move_Or_Merge_Aspects): New routine. (Remove_Aspects): New routine. * par-ch3.adb: Update the grammar of private_type_declaration, private_extension_declaration, object_renaming_declaration, and exception_renaming_declaration. (P_Subprogram): Parse the aspect specifications that apply to a body stub. * par-ch6.adb: Update the grammar of subprogram_body_stub and generic_instantiation. * par-ch7.adb: Update the grammar of package_declaration, package_specification, package_body, package_renaming_declaration, package_body_stub. (P_Package): Parse the aspect specifications that apply to a body, a body stub and package renaming. * par-ch9.adb: Update the grammar of entry_declaration, protected_body, protected_body_stub, task_body, and task_body_stub. (P_Protected): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a protected body and a protected body stub. (P_Task): Add local variable Aspect_Sloc. Add local constant Dummy_Node. Parse the aspect specifications that apply to a task body and a task body stub. * par-ch12.adb: Update the grammar of generic_renaming_declaration. (P_Generic): Parse the aspect specifications that apply to a generic renaming. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not emit an error when analyzing aspects that apply to a body stub. Such aspects are relocated to the proper body. * sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the aspect specifications that apply to a body. * sem_ch9.adb (Analyze_Protected_Body): Warn about user-defined aspects not being supported on protected bodies. Remove the aspect specifications. (Analyze_Single_Protected_Declaration): Analyze the aspects that apply to a single protected declaration. (Analyze_Task_Body): Warn about user-defined aspects not being supported on task bodies. Remove the aspect specifications. * sem_ch10.adb: Add with and use clause for Aspects. (Analyze_Package_Body_Stub): Propagate the aspect specifications from the stub to the proper body. * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the corresponding pragma of an aspect that applies to a body in the declarations of the body. * sinfo.ads: Update the gramma of expression_function, private_type_declaration, private_extension_declaration, object_renaming_declaration, exception_renaming_declaration, package_renaming_declaration, subprogram_renaming_declaration, generic_renaming_declaration, entry_declaration, subprogram_body_stub, package_body_stub, task_body_stub, generic_subprogram_declaration. 2013-09-10 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Pragma): Add processing for aspect/pragma SPARK_Mode when it applies to a [library-level] subprogram or package [body]. 2013-09-10 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document that -gnatc and -gnatR cannot be given together. * switch-c.adb (Scan_Front_End_Switches): Give error if both -gnatR and -gnatc given. 2013-09-10 Robert Dewar <dewar@adacore.com> * g-table.ads, g-table.adb (For_Each): New generic procedure (Sort_Table): New generic procedure. From-SVN: r202460
2013-04-24[multiple changes]Arnaud Charlet1-0/+16
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the extraction of the declarative part of the conditional block. Move the processing of simple infinite loops to the start of the expansion logic. Correct the check which determines whether the proper scope is installed in visibility. * sem_attr.adb (Analyze_Attribute): Add local variable Attr to keep track of the attribute in case the enclosing indexed component has to be rewritten. When searching for the enclosing loop, start from the proper attribute reference in case of a rewriting. Do not allow for 'Loop_Entry to appear in pragma Assert. Replace loop variable J with Index. Set the type of the proper attribute. * sem_ch5.adb (Check_Unreachable_Code): Detect a specialized block that services a loop statement subject to at least one 'Loop_Entry attribute. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to resolve a fixed point operation, use first subtype to determine whether type and operator are declared in the same list of declarations. 2013-04-24 Hristian Kirtchev <kirtchev@adacore.com> * par-ch6.adb (P_Subprogram): Detect an illegal placement of the aspect specification list in the context of expression functions. 2013-04-24 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Allocator): If the designated object has tasks, and the pointer type is an itype that has no master id, create a master renaming in the current context, which can only be an init_proc. From-SVN: r198242
2013-04-23[multiple changes]Arnaud Charlet1-1/+1
2013-04-23 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Fix_Error): Rewrite to do more accurate job of getting proper name in the case where pragma comes from aspect. * sem_ch3.adb, sinfo.ads, par-ch6.adb, exp_ch6.adb: Minor reformatting. 2013-04-23 Yannick Moy <moy@adacore.com> * sem_ch6.adb (Process_PPCs): Do not filter postconditions based on applicable policy. 2013-04-23 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Traverse_Aux_Decls): Minor code reorganization. 2013-04-23 Doug Rupp <rupp@adacore.com> * init.c: Move facility macros outside IN_RTS. 2013-04-23 Thomas Quinot <quinot@adacore.com> * freeze.adb (Freeze_Entity): For the case of a bit-packed array time that is known at compile time to have more that Integer'Last+1 elements, issue an error, since such arrays are not supported. From-SVN: r198178
2013-04-11[multiple changes]Arnaud Charlet1-1/+10
2013-04-11 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Subprogram): Attach aspects to subprogram stub. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Allow aspects on subprogram stubs. * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze generated pre/post pragmas at once before analyzing the proper body. * sem_prag.adb (Chain_PPC): Handle pragma that comes from an aspect on a subprogram stub. * aspects.adb: Aspect specifications can appear on a subprogram_Body_Stub. 2013-04-11 Vincent Celier <celier@adacore.com> * gnatname.adb: Minor comment fix. 2013-04-11 Vincent Celier <celier@adacore.com> * prj-makr.adb (Process_Directory): Create a new temporary file for each invocation of the compiler, in directory pointed by environment variable TMPDIR if it exists. 2013-04-11 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Minor editing/clean ups. From-SVN: r197781
2013-01-29[multiple changes]Arnaud Charlet1-9/+58
2013-01-29 Robert Dewar <dewar@adacore.com> * par-ch6.adb (No_Constraint_Maybe_Expr_Func): New procedure. * par-util.adb (No_Constraint): Undo special handling, moved to par-ch6.adb. 2013-01-29 Robert Dewar <dewar@adacore.com> * aspects.ads: Aspect Warnings is implementation defined Add some other missing entries to impl-defined list Mark Warnings as GNAT pragma in main list. * sem_ch8.adb: Process aspects for all cases of renaming declarations. 2013-01-29 Robert Dewar <dewar@adacore.com> * sem_ch6.adb (Analyze_Function_Call): Set In_Assertion flag. * sem_elab.adb (Check_Internal_Call_Continue): Do not issue warnings about possible elaboration error if call is within an assertion. * sinfo.ads, sinfo.adb (In_Assertion): New flag in N_Function_Call node. 2013-01-29 Robert Dewar <dewar@adacore.com> * a-calend-vms.adb, g-eacodu-vms.adb, g-trasym-vms-alpha.adb, * s-auxdec-vms-ia64.adb, s-mastop-vms.adb, s-osprim-vms.adb, s-tasdeb-vms.adb: Replace pragma Interface by pragma Import. 2013-01-29 Robert Dewar <dewar@adacore.com> * opt.ads (Ignore_Style_Checks_Pragmas): New flag. * par-prag.adb (Par, case Style_Checks): Recognize Ignore_Style_Checks_Pragmas. * sem_prag.adb (Analyze_Pragma, case Style_Checks): Recognize Ignore_Style_Checks_Pragmas. * switch-c.adb: Recognize -gnateY switch. * usage.adb: Add documentation for "-gnateY". * vms_data.ads: Add IGNORE_STYLE_CHECKS_PRAGMAS (-gnateY). 2013-01-29 Vincent Celier <celier@adacore.com> * clean.adb (Clean_Executables): Add Sid component when calling Queue.Insert. * make.adb: When inserting in the Queue, add the Source_Id (Sid) when it is known (Start_Compile_If_Possible): When the Source_Id is known (Sid), get the path name of the ALI file (Full_Lib_File) from it, to avoid finding old ALI files in other object directories. * makeutl.ads (Source_Info): New Source_Id component Sid in Format_Gnatmake variant. 2013-01-29 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document -gnateY. 2013-01-29 Doug Rupp <rupp@adacore.com> * s-osinte-vms.ads, s-taprop-vms.adb, system-vms_64.ads, system-vms-ia64.ads: Replace pragma Interface by pragma Import. From-SVN: r195536
2013-01-04types.ads, [...]: Minor reformatting.Robert Dewar1-7/+18
2013-01-04 Robert Dewar <dewar@adacore.com> * types.ads, prj-conf.adb, par-tchk.adb: Minor reformatting. 2013-01-04 Robert Dewar <dewar@adacore.com> * par-ch6.adb (P_Subprogram): Better handling of missing IS after expression function. * par-util.adb (No_Constraint): Improve handling to avoid bad warnings. 2013-01-04 Robert Dewar <dewar@adacore.com> * exp_util.ads, exp_util.adb (Insert_Actions): In expression with actions case, new actions are appended to the sequence rather than prepended. 2013-01-04 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Document -gnatw.d/w.D (does no apply in VMS mode). * usage.adb: Add lines for -gnatw.d/w.D switches. * warnsw.adb: Minor fixes (some missing cases of setting Warning_Doc_Switch). Reject -gnatw.d and -gnatw.D in VMS mode. From-SVN: r194895
2012-12-05[multiple changes]Arnaud Charlet1-7/+2
2012-12-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Return_Object_Declaration): Do not check for legality of Aliased keyword. * sem_ch6.adb (Analyze_Function_Return): The keyword aliased is legal in an extended return statement only if the return type is immutably limited. 2012-12-05 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Expand_Interface_Thunk): Simplify management of controlling formals. Required to avoid problems with primitives of internally generated base types associated with constrained tagged types. From-SVN: r194201
2012-10-29[multiple changes]Arnaud Charlet1-0/+3
2012-10-29 Arnaud Charlet <charlet@adacore.com> * warnsw.adb (Set_GNAT_Mode_Warnings): Unset Warn_On_Standard_Redefinition. 2012-10-29 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Derive_Progenitor_Subprograms): Complete documentation. 2012-10-29 Robert Dewar <dewar@adacore.com> * par-ch11.adb (Warn_If_Standard_Redefinition): Add calls. * par-ch3.adb (P_Defining_Identifier): Call Warn_If_Standard_Redefinition if not inside record definition. * par-ch6.adb (Warn_If_Standard_Redefinition): Add calls. * par-util.adb (Warn_If_Standard_Redefinition): New procedure. * par.adb (Inside_Record_Definition): New flag. (Warn_If_Standard_Redefinition): New procedure. * sinfo-cn.adb (Change_Identifier_To_Defining_Identifier): Remove handling of warning for redefining standard name (moved to Par*). From-SVN: r192927
2012-07-23[multiple changes]Arnaud Charlet1-1/+6
2012-07-23 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply to a formal object of an anonymous access type. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Container_Indexing): A user-defined indexing aspect can have more than one index, e.g. to describe indexing of a multidimensional object. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is now more complex and contains optional finalization part and mandatory deallocation part. 2012-07-23 Gary Dismukes <dismukes@adacore.com> * a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb, a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress Accessibility_Check for Element_Type allocators. 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com> * projects.texi: Fix typo. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Explicit_Derenference): If prefix is overloaded, remove those interpretations whose designated type does not match the context, to avoid spurious ambiguities that may be caused by the Ada 2012 conversion rule for anonymous access types. From-SVN: r189774
2012-07-23[multiple changes]Arnaud Charlet1-1/+31
2012-07-23 Vincent Celier <celier@adacore.com> * g-spitbo.adb (Substr (String)): Return full string and do not raise exception when Start is 1 and Len is exactly the length of the string parameter. * g-spitbo.ads: Fix spelling error in the name of exception Index_Error. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * par.adb: new subprogram Get_Aspect_Specifications. * par-ch6.adb (P_Subprogram): handle subprogram bodies with aspect specifications. * par-ch13.adb (Get_Aspect_Specifications): extracted from P_Aspect_Specifications. Collect aspect specifications in some legal context, but do not attach them to any declaration. Used when parsing subprogram declarations or bodies that include aspect specifications. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If aspects are present, analyze them, or reject them if the subprogram as a previous spec. 2012-07-23 Vasiliy Fofanov <fofanov@adacore.com> * gnat_ugn.texi: Omit section on other platforms/runtimes support in gnattest for vms version. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle properly aspects that can be specified on a subprogram body: CPU, Priority, and Interrupt_Priority. 2012-07-23 Claire Dross <dross@adacore.com> * a-cfdlli.ads: Switch definition of Constant_Reference_Type and Empty_List. 2012-07-23 Thomas Quinot <quinot@adacore.com> * par_sco.adb (Process_Decisions.Output_Header): For the guard on an alternative in a SELECT statement, use the First_Sloc of the guard expression (not its topmost sloc) as the decision location, because this is what is referenced by dominance markers. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Requires_Hooking): Examine the original expression of an object declaration node because a function call that returns on the secondary stack may have been rewritten into something else. 2012-07-23 Vincent Pucci <pucci@adacore.com> * sem_dim.adb (Analyze_Dimension_Has_Etype): For identifier, propagate dimension when entity is a non-dimensionless constant. (Analyze_Dimension_Object_Declaration): Propagate dimension from the expression to the entity when type is a dimensioned type and object is a constant. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Analyze_Attribute, case 'Old): if the prefix is not an entity name, expand at once so that code generated by the expansion of the prefix is not generated before the constant that captures the old value is properly inserted and analyzed. 2012-07-23 Thomas Quinot <quinot@adacore.com> * exp_ch9.adb (Ensure_Statement_Present): Mark generated NULL statement as Comes_From_Source so that GIGI does not eliminate it. From-SVN: r189773
2012-03-15[multiple changes]Arnaud Charlet1-1/+2
2012-03-15 Robert Dewar <dewar@adacore.com> * par-ch6.adb, einfo.ads, sem_eval.adb, sem_eval.ads, sem_case.adb: Minor reformatting. 2012-03-15 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add handling of First_Valid/Last_Valid. * sem_attr.adb (Check_First_Last_Valid): New procedure (Analyze_Attribute): Add handling of First_Valid and Last_Valid (Eval_Attribute): ditto. * snames.ads-tmpl: Add entries for First_Valid and Last_Valid. 2012-03-15 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Predicated_Loop): Suppress warnings on loop variable, for the unusual case where the range has a single element and the loop variable has no visible assignment to it. 2012-03-15 Vincent Pucci <pucci@adacore.com> * exp_ch4.adb (Expand_N_Quantified_Expression): Expand the original quantified expression node. * sem_ch4.adb (Analyze_Quantified_Expression): Properly analyze the quantified expression and preserve the original non-analyzed quantified expression when an expansion is needed. * sem_ch5.adb (Analyze_Iteration_Scheme): Special treatment for quantified expressions. (Analyze_Iterator_Specification): Special treatment for quantified expressions. 2012-03-15 Ed Falis <falis@adacore.com> * s-vxwork-ppc.ads: Update FP_CONTEXT so name of former pad field matches VxWorks headers. From-SVN: r185409
2012-02-17[multiple changes]Arnaud Charlet1-2/+5
2012-02-17 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Minor shuffling. 2012-02-17 Ed Schonberg <schonberg@adacore.com> * aspects.adb: Expression functions can carry pre/postconditions. * par-ch6.adb (P_Subprogram): look for optional pre/postconditions in an expression function. * sem_prag (Check_Precondition_Postcondition): legal on expression functions. 2012-02-17 Vincent Pucci <pucci@adacore.com> * a-cdlili.adb, a-cidlli.adb, a-cihama.adb, a-cimutr.adb, * a-ciorma.adb, a-cohama.adb, a-coinve.adb, a-comutr.adb, * a-convec.adb, a-coorma.adb (Adjust): New routine. (Constant_Reference): Increment Busy and Lock counters. (Reference): Increase Busy and Lock counters. (Finalize): New routine. * a-cihase.adb, a-ciorse.adb, a-cohase.adb, a-coorse.adb: (Adjust): New routine. (Constant_Reference): Increment Busy and Lock counters. (Finalize): New routine. * a-cdlili.ads, a-cidlli.ads, a-cihama.ads, a-cihase.ads, * a-cimutr.ads, a-ciorma.ads, a-ciorse.ads, a-cohama.ads, * a-cohase.ads, a-coinve.ads, a-comutr.ads, a-convec.ads, * a-coorma.ads, a-coorse: Controlled component added to the reference types. 2012-02-17 Robert Dewar <dewar@adacore.com> * restrict.adb (Check_Restriction): Add special handling for No_Obsolescent_Features. 2012-02-17 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Find_Finalize_Address): When dealing with an internally built full view for a type with unknown discriminants, use the original record type. From-SVN: r184341
2011-11-23[multiple changes]Arnaud Charlet1-1/+1
2011-11-23 Robert Dewar <dewar@adacore.com> * exp_util.adb, par-ch6.adb, sem_res.adb, par-util.adb: Minor reformatting. 2011-11-23 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Place error on line of precondition/ postcondition/invariant. 2011-11-23 Pascal Obry <obry@adacore.com> * g-exptty.ads, g-exptty.adb, g-tty.ads, g-tty.adb, terminals.c: New files. Makefile.rtl: Add these new files. * gnat_rm.texi: Add documentation for GNAT.Expect.TTY. * gcc-interface/Makefile.in: Add g-exptty, g-tty, terminals.o * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r181655
2011-11-21[multiple changes]Arnaud Charlet1-1/+3
2011-11-21 Arnaud Charlet <charlet@adacore.com> * s-taprop-irix.adb, s-taprop-solaris.adb (Create_Task): Use Unrestricted_Access to deal with fact that we properly detect the error if Access is used. * gcc-interface/Make-lang.in: Update dependencies. 2011-11-21 Yannick Moy <moy@adacore.com> * exp_prag.adb (Expand_Pragma_Check): Place error on first character of expression. * sem_res.adb (Resolve_Short_Circuit): Place error on first character of expression. 2011-11-21 Yannick Moy <moy@adacore.com> * exp_util.adb (Remove_Side_Effects): Do nothing in Alfa mode. 2011-11-21 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference, case Max_Size_In_Storage_Elements): Account for the size of the hidden list header which precedes controlled objects allocated on the heap. * rtsfind.ads: Add RE_Header_Size_With_Padding to the runtime tables. * sinfo.adb (Header_Size_Added): New routine. (Set_Header_Size_Added): New routine. * sinfo.ads: Add flag Controlled_Header_Added along with associated comment. (Header_Size_Added): New inlined routine. (Set_Header_Size_Added): New inlined routine. * s-stposu.adb (Allocate_Any_Controlled): Use Header_Size_With_Padding to calculate the proper size of the header. (Deallocate_Any_Controlled): Use Header_Size_With_Padding to calculate the proper size of the header. (Header_Size_With_Padding): New routine. (Nearest_Multiple_Rounded_Up): Removed along with its uses. * s-stposu.ads (Header_Size_With_Padding): New routine. 2011-11-21 Ed Schonberg <schonberg@adacore.com> * aspects.adb: Aspect specifications are allowed on renaming declarations * par-ch6.adb (P_Subprogram): Parse aspect specifications in a subprogram renaming declaration From-SVN: r181576
2011-10-14[multiple changes]Arnaud Charlet1-0/+8
2011-10-14 Gary Dismukes <dismukes@adacore.com> * sem_res.adb: Minor reformatting. 2011-10-14 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Code and comment reformatting. Use BIP_Task_Master when creating a _master. (BIP_Formal_Suffix): Code reformatting. Correct the case for BIP_Task_Master. (Make_Build_In_Place_Call_In_Object_Declaration): Use BIP_Task_Master when creating a reference to the enclosing function's _master formal. (Move_Activation_Chain): Use BIP_Task_Master when creating a reference to the _master. * exp_ch6.ads: Change BIP_Master to BIP_Task_Master. (Needs_BIP_Finalization_Master): Alphabetized. * sem_ch6.adb (Create_Extra_Formals): Update the usage of BIP_Task_Master. 2011-10-14 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode, reject an aliased keyword on the object declaration of an extended return statement. In older versions of the language indicate that this is illegal in the standard. 2011-10-14 Pascal Obry <obry@adacore.com> * sem_util.adb, sem_ch4.adb: Minor reformatting. 2011-10-14 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Recognize properly procedure calls that are transformed into code statements. 2011-10-14 Vincent Celier <celier@adacore.com> * projects.texi: Minor fix in project example. From-SVN: r179986
2011-10-13[multiple changes]Arnaud Charlet1-1/+1
2011-10-13 Robert Dewar <dewar@adacore.com> * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb, prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb, par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads, exp_aggr.adb, s-taprop-posix.adb: Minor reformatting. 2011-10-13 Geert Bosch <bosch@adacore.com> * s-gearop.adb: Minor comment additions. From-SVN: r179907
2011-10-06[multiple changes]Arnaud Charlet1-2/+2
2011-10-06 Thomas Quinot <quinot@adacore.com> * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb, g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb, par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb, sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb, s-regpat.adb, s-tpopde-vms.ads: Minor reformatting. * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD. 2011-10-06 Ed Schonberg <schonberg@adacore.com> * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container references. 2011-10-06 Matthew Heaney <heaney@adacore.com> * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb (Dequeue_Only_High_Priority): Protected procedure now implemented. 2011-10-06 Vincent Celier <celier@adacore.com> * g-trasym.adb: Replace old implementation with the default implementation that returns list of addresses as "0x...". * g-trasym.ads: Update the list of platforms with the full capability. Indicate that there is a default implementation for other platforms. * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove. * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there is now a default implementation for all platforms without the full capability. From-SVN: r179631
2011-09-05sem_ch3.adb, [...]: Minor reformatting.Robert Dewar1-5/+3
2011-09-05 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb, exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting. From-SVN: r178536
2011-09-05[multiple changes]Arnaud Charlet1-2/+34
2011-09-05 Johannes Kanig <kanig@adacore.com> * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect information. 2011-09-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram appears within a package specification and the token after "IS" is not a parenthesis, assume that this is an unparenthesized expression function, even if the token appears in a line by itself. * par.adb: Clarify use of Labl field of scope stack in error recovery. From-SVN: r178532
2011-09-01[multiple changes]Arnaud Charlet1-4/+20
2011-09-01 Robert Dewar <dewar@adacore.com> * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting. 2011-09-01 Thomas Quinot <quinot@adacore.com> * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to GNATRTL_NONTASKING_OBJS. 2011-09-01 Robert Dewar <dewar@adacore.com> * einfo.ads (Is_Aliased): Fix existing documentation and add note on possibility of this flag being set for formals in Ada 2012 mode. * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada 2012. * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012 mode. * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for Ada 2012. * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for Ada 2012. 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper insertion node in a tree of nested Expression_With_Actions nodes. (Process_Transient_Object): In the case where a complex if statement has been converted into nested Expression_With_Actions nodes, the "hook" object and the associated access type must be inserted before the top most Expression_With_Actions. From-SVN: r178401
2011-08-02[multiple changes]Arnaud Charlet1-1/+23
2011-08-02 Sergey Rybin <rybin@adacore.com> * gnat_rm.texi: Ramification of pragma Eliminate documentation - fix bugs in the description of Source_Trace; - get rid of UNIT_NAME; 2011-08-02 Javier Miranda <miranda@adacore.com> * exp_ch9.adb (Build_Dispatching_Requeue): Adding support for VM targets since we cannot directly reference the Tag entity. * exp_sel.adb (Build_K): Adding support for VM targets. (Build_S_Assignment): Adding support for VM targets. * exp_disp.adb (Default_Prim_Op_Position): In VM targets do not restrict availability of predefined interface primitives to compiling in Ada 2005 mode. (Is_Predefined_Interface_Primitive): In VM targets this service is not restricted to compiling in Ada 2005 mode. (Make_VM_TSD): Generate code that declares and initializes the OSD record. Needed to support dispatching calls through synchronized interfaces. * exp_ch3.adb (Make_Predefined_Primitive_Specs): Enable generation of predefined primitives associated with synchronized interfaces. (Make_Predefined_Primitive_Bodies): Enable generation of predefined primitives associated with synchronized interfaces. 2011-08-02 Yannick Moy <moy@adacore.com> * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of statements hidden in SPARK if preceded by the HIDE directive (Parse_Exception_Handlers): mark each exception handler in a sequence of exception handlers as hidden in SPARK if preceded by the HIDE directive * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK if starting with the HIDE directive * par-ch7.adb (P_Package): mark a package body hidden in SPARK if starting with the HIDE directive; mark the declarations in a private part as hidden in SPARK if the private part starts with the HIDE directive * restrict.adb, restrict.ads (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK (Is_In_Hidden_Part_In_SPARK): new function which returns whether its argument node belongs to a part which is hidden in SPARK (Check_SPARK_Restriction): do not issue violations on nodes in hidden parts in SPARK; protect the possibly costly call to Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration * scng.adb (Accumulate_Token_Checksum_GNAT_6_3, Accumulate_Token_Checksum_GNAT_5_03): add case for new token Tok_SPARK_Hide. (Scan): recognize special comment starting with '#' and followed by SPARK keyword "hide" as a HIDE directive. 2011-08-02 Yannick Moy <moy@adacore.com> * types.ads, erroutc.ads: Minor reformatting. 2011-08-02 Vincent Celier <celier@adacore.com> * link.c: Add response file support for cross platforms. From-SVN: r177179
2011-08-02par-ch6.adb: Correct obsolete name in commentsYannick Moy1-4/+4
2011-08-02 Yannick Moy <moy@adacore.com> * par-ch6.adb: Correct obsolete name in comments * restrict.adb, restrict.ads (Check_Formal_Restriction): new function which takes two message arguments (existing function takes one), with second message used for continuation. * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject block statements that originate from a source block statement, not generated block statements * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for symmetry with procedure case * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new function to issue an error in formal mode if a package specification contains more than one tagged type or type extension. * sem_res.adb (Resolve_Actuals): in formal mode, check that actual parameters matching formals of tagged types are objects (or ancestor type conversions of objects), not general expressions. Issue an error on view conversions that are not involving ancestor conversion of an extended type. (Resolve_Type_Conversion): in formal mode, issue an error on the operand of an ancestor type conversion which is not an object * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the procedure so that it works also for actuals of function calls (Is_Actual_Tagged_Parameter): new function which determines if its argument is an actual parameter of a formal of tagged type in a subprogram call (Is_SPARK_Object_Reference): new function which determines if the tree referenced by its argument represents an object in SPARK From-SVN: r177125
2011-08-02[multiple changes]Arnaud Charlet1-35/+34
2011-08-02 Robert Dewar <dewar@adacore.com> * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb, sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized expression to expression function. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: transform simple Ada2012 membership into equality only if types are compatible. 2011-08-02 Yannick Moy <moy@adacore.com> * sem_res.adb (Matching_Static_Array_Bounds): new function which returns True if its argument array types have same dimension and same static bounds at each index. (Resolve_Actuals): issue an error in formal mode on actuals passed as OUT or IN OUT paramaters which are not view conversions in SPARK. (Resolve_Arithmetic_Op): issue an error in formal mode on multiplication or division with operands of fixed point types which are not qualified or explicitly converted. (Resolve_Comparison_Op): issue an error in formal mode on comparisons of Boolean or array type (except String) operands. (Resolve_Equality_Op): issue an error in formal mode on equality operators for array types other than String with non-matching static bounds. (Resolve_Logical_Op): issue an error in formal mode on logical operators for array types with non-matching static bounds. Factorize the code in Matching_Static_Array_Bounds. (Resolve_Qualified_Expression): issue an error in formal mode on qualified expressions for array types with non-matching static bounds. (Resolve_Type_Conversion): issue an error in formal mode on type conversion for array types with non-matching static bounds From-SVN: r177089
2010-10-12[multiple changes]Arnaud Charlet1-4/+19
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-2/+2
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-11par-ch9.adb, [...]: Use Ada_2005 instead of Ada_05 (Ada_Version_Type).Bob Duff1-5/+5
2010-10-11 Bob Duff <duff@adacore.com> * par-ch9.adb, sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb, switch-c.adb, exp_attr.adb, exp_ch9.adb, par-ch11.adb, usage.adb, sem_ch9.adb, sem_ch10.adb, scng.adb, checks.adb, sem_prag.adb, sem_ch12.adb, par-ch2.adb, freeze.adb, par-ch4.adb, sem_util.adb, sem_res.adb, sem_attr.adb, par-ch6.adb, exp_ch4.adb, exp_ch6.adb, sem_ch4.adb, exp_ch8.adb, par-ch10.adb, sem_ch6.adb, par-prag.adb, exp_disp.adb, par-ch12.adb, sem_ch8.adb, snames.adb-tmpl, opt.ads, exp_aggr.adb, sem_cat.adb, sem_ch13.adb, par-ch3.adb, exp_strm.adb, exp_cg.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Use Ada_2005 instead of Ada_05 (Ada_Version_Type). From-SVN: r165283
2010-10-11[multiple changes]Arnaud Charlet1-1/+1
2010-10-11 Bob Duff <duff@adacore.com> * sem_aggr.adb, impunit.adb, impunit.ads, switch-c.adb, usage.adb, sem_ch10.adb, sem_prag.adb, sem_ch12.adb, par-ch4.adb, par-ch6.adb, par-ch8.adb, exp_ch4.adb, sem_ch4.adb, sem_ch6.adb, par-prag.adb, opt.ads, par-ch3.adb, lib-xref.adb: Use Ada_2012 instead of Ada_12 (Ada_Version_Type). 2010-10-11 Javier Miranda <miranda@adacore.com> * exp_util.adb (Safe_Prefixed_Reference): If the prefix is an explicit dereference then do not exclude dereferences of access-to-constant types to handle them as constant view of variables (and hence remove side effects when required). * sem_res.adb (Resolve_Slice): Ensure that side effects in the bounds are properly handled. From-SVN: r165282
2010-10-07gnat_rm.texi, [...]: Change spelling parametrize(d) => parameterize(d).Robert Dewar1-26/+26
2010-10-07 Robert Dewar <dewar@adacore.com> * gnat_rm.texi, exp_util.adb, sinfo.adb, sinfo.ads, sem_ch12.adb, sem.adb, gnat_ugn.texi, sem_util.ads, par-ch6.adb, targparm.ads, restrict.adb, sem_ch6.adb, sem_ch6.ads, sprint.adb, i-c.ads: Change spelling parametrize(d) => parameterize(d). From-SVN: r165103
2010-10-07[multiple changes]Arnaud Charlet1-57/+94
2010-10-07 Robert Dewar <dewar@adacore.com> * par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add Pexp to Pf_Rec constants (P_Subprogram): Expression is always enclosed in parentheses * par.adb (Pf_Rec): add Pexp flag for parametrized expression * sinfo.ads (N_Parametrized_Expression): Expression must be in parens 2010-10-07 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Specification): Implement Ada2012 checks on functions that return an abstract type or have a controlling result whose designated type is an abstract type. (Check_Private_Overriding): Implement Ada2012 checks on functions declared in the private part, if an abstract type is involved. * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): In Ada2012, reject a generic function that returns an abstract type. * exp_ch5.adb (Expand_Simple_Function_Return): in Ada2012, if a function has a controlling access result, check that the tag of the return value matches the designated type of the return expression. From-SVN: r165100
2010-10-07[multiple changes]Arnaud Charlet1-12/+21
2010-10-07 Robert Dewar <dewar@adacore.com> * par-ch6.adb: Fix error in handling of parametrized expressions. * par-ch4.adb (P_Name): Allow qualified expression as name in Ada 2012 mode. (P_Simple_Expression): Better message for qualified expression prefix * s-crc32.adb: Minor reformatting. * exp_intr.adb (Expand_Unc_Deallocation): Remove test for empty storage pool (this test is moved to Sem_Intr). * sem_intr.adb (Check_Intrinsic_Call): Add check for deallocation from empty storage pool, moved here from Exp_Intr and made into error. (Check_Intrinsic_Call): Remove assumption in generating not-null free warning that the name of the instantiation is Free. * sinput.adb (Tree_Read): Document use of illegal free call allowed in GNAT mode. * types.ads: Remove storage size clauses from big types (since we may need to do deallocations, which are now illegal for empty pools). 2010-10-07 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: Add missing word. From-SVN: r165099
2010-10-07exp_util.adb (Insert_Actions): Add handling of N_Parametrized_Expression.Robert Dewar1-21/+106
2010-10-07 Robert Dewar <dewar@adacore.com> * exp_util.adb (Insert_Actions): Add handling of N_Parametrized_Expression. * par-ch6.adb (P_Subprogram): Add parsing of parametrized expression * sem.adb: Add entry for N_Parametrized_Expression * sem_ch6.adb (Analyze_Parametrized_Expression): New procedure * sem_ch6.ads (Analyze_Parametrized_Expression): New procedure * sinfo.ads, sinfo.adb: Add N_Parametrized_Expression * sprint.adb (Sprint_Node): Add handling for N_Parametrized_Expression * par-ch4.adb: Minor reformatting. From-SVN: r165098
2010-10-05exp_ch3.adb, [...]: Minor code reorganization.Robert Dewar1-4/+7
2010-10-05 Robert Dewar <dewar@adacore.com> * exp_ch3.adb, exp_ch5.adb, exp_disp.adb, exp_dist.adb, gnatlink.adb, makeutl.adb, par-ch6.adb, prj-dect.adb, prj-env.adb, prj-env.ads, prj-ext.adb, prj-nmsc.adb, prj-part.adb, prj-pp.ads: Minor code reorganization. Minor reformatting. From-SVN: r164979
2010-10-05[multiple changes]Arnaud Charlet1-5/+11
2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb: Do not elaborate type definition if syntax error. 2010-10-05 Javier Miranda <miranda@adacore.com> * sprint.adb (Sprint_Node_Actual): Improve output of subprogram bodies to generate the full-qualified names of its corresponding spec. This facilitates locating the corresponing body when reading the DG output. 2010-10-05 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (Make_Helper_Function_Name): For a tagged type, use canonical name without serial number only if the helper is becoming a primitive of the type. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Make_DT): Minor code reorganization. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * par-ch6.adb: improve recovery with extra paren in function spec. 2010-10-05 Quentin Ochem <ochem@adacore.com> * prj-tree.ads: Project_Path is now aliased. 2010-10-05 Thomas Quinot <quinot@adacore.com> * checks.adb: Minor reformatting. 2010-10-05 Eric Botcazou <ebotcazou@adacore.com> * mlib-tgt-specific-mingw.adb (No_Argument_List): Delete. (Shared_Libgcc): New aliased variable. (Shared_Libgcc_Switch): New constant. (Build_Dynamic_Library): Pass Shared_Libgcc_Switch to the compiler * gcc-interface/Makefile.in (gnatlib-shared-win32): Pass -shared-libgcc to the compiler. 2010-10-05 Vincent Celier <celier@adacore.com> * prj-part.adb (Parse_Simple_Project): When checking if a child project imports its parent project, also look in projects being extended by imported projects. 2010-10-05 Eric Botcazou <ebotcazou@adacore.com> * gnat_ugn.texi: Adjust instructions in G.10 Building DLLs with GNAT. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_cg.adb (Slot_Number): Add support to handle aliased entities. (Generate_CG_Output): Switch -gnatd.Z is no longer needed to activate this output. 2010-10-05 Arnaud Charlet <charlet@adacore.com> * back_end.adb (Call_Back_End): Generate an error message when scil generation is enabled, and no scil back-end (by default) is available. 2010-10-05 Javier Miranda <miranda@adacore.com> * debug.adb: Update documentation because -gnatd.Z is no longer required to generate the call-graph information. 2010-10-05 Javier Miranda <miranda@adacore.com> * exp_ch5.adb (Expand_Simple_Function_Return): Rewrite expansion of a runtime access check by an equivalent expansion that causes no problems in the VM backend. The original expansion was not good for the VM backends because when Tagged_Type_Expansion is disabled the attribute Access_Disp_Table is not available. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_type.adb (Covers): In a dispatching context, T1 covers T2 if T2 is class-wide and T1 is its specific type. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * einfo.adb: Add guard to Is_String_Type to prevent cascaded errors. 2010-10-05 Vincent Celier <celier@adacore.com> * back_end.ads: Minor spelling error correction. 2010-10-05 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, gnat1drv.adb (Scan_Front_End_Switches): Disable warnings when -gnatC is specified here so that warnings can be re-enabled explicitly. (Adjust_Global_Switches): No longer suppress warnings. 2010-10-05 Vincent Celier <celier@adacore.com> * makeutl.adb: Minor reformatting. 2010-10-05 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: add guard in Analyze_One_Call to prevent crash when a non-discrete type appears as an actual in a call. From-SVN: r164976
2010-09-10[multiple changes]Arnaud Charlet1-1/+1
2010-09-10 Vincent Celier <celier@adacore.com> * vms_data.ads: Add new GNAT BIND qualifiers /32_MALLOC (for -H32) and /64_MALLOC (for -H64). 2010-09-10 Robert Dewar <dewar@adacore.com> * errout.adb (Error_Msg_Internal): Test Parsing_Main_Subunit flag (Error_Msg_NW): Test Parsing_Main_Subunit flag * errout.ads (Parsing_Main_Subunit): New flag * lib-load.adb (Load_Unit): Set Parsing_Main_Subunit flag * par-ch6.adb: Minor style fix (remove redandant parentheses) * par-ch9.adb: Minor style fix (remove redundant parens) * par-load.adb: (Load): Deal with setting Parsing_Main_Subunit 2010-09-10 Vincent Celier <celier@adacore.com> * make.adb (Create_Binder_Mapping_File): Remove procedure. Replaced by function of the same name in Makeutl. (Gnatmake): Call function Create_Binder_Mapping_File in Makeutl, instead of removed procedure when creating a binder mapping file. * makeutl.adb (Create_Binder_Mapping_File): New function. Was a procedure in Make. * makeutl.ads (Create_Binder_Mapping_File): New function From-SVN: r164176
2010-06-18par-ch9.adb, [...]: Update comments.Arnaud Charlet1-14/+24
* par-ch9.adb, sem_aggr.adb, sem_ch3.adb, layout.adb, sem_ch4.adb, sem_ch5.adb, sem_mech.adb, exp_util.adb, par-ch10.adb, sem_ch6.adb, par-ch11.adb, sem_ch7.adb, par-prag.adb, exp_disp.adb, par-ch12.adb, sem_ch8.adb, style.adb, sem_ch9.adb, sem_ch10.adb, prep.adb, sem_warn.adb, par-util.adb, scng.adb, sem_eval.adb, checks.adb, sem_prag.adb, sem_ch12.adb, styleg.adb, sem_ch13.adb, par-ch3.adb, par-tchk.adb, freeze.adb, sfn_scan.adb, par-ch4.adb, sem_util.adb, sem_res.adb, par-ch5.adb, lib-xref.adb, sem_attr.adb, par-ch6.adb, sem_disp.adb, prepcomp.adb, par-ch7.adb, sem_elab.adb, exp_ch4.adb, errout.ads: Update comments. Minor reformatting. From-SVN: r160979
2010-06-14[multiple changes]Arnaud Charlet1-4/+7
2010-06-14 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub and gnatppa. 2010-06-14 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram, factoring duplicated code between... (Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code. * a-envvar.ads: Minor reformatting 2010-06-14 Arnaud Charlet <charlet@adacore.com> * ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++ static entities. (Scan_ALI): Take into account new Visibility field. (Visibility_Kind): New type. (Xref_Entity_Record): Replace Lib field by Visibility. * gcc-interface/Make-lang.in: Update dependencies. 2010-06-14 Pascal Obry <obry@adacore.com> * raise.h: Remove unused defintions. 2010-06-14 Bob Duff <duff@adacore.com> * par-ch10.adb (P_Subunit): If the next token after "separate(X)" is Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given the incorrect error "proper body expected". * par-ch6.adb (P_Subprogram): Suppress "overriding indicator not allowed here" error in case of subunits, which was triggered by the above change to P_Subunit. From-SVN: r160740
2009-05-06errout.adb: Minor reformattingRobert Dewar1-1/+2
2009-05-06 Robert Dewar <dewar@adacore.com> * errout.adb: Minor reformatting * scng.adb, sem_prag.adb, par-ch4.adb, sem_res.adb, par-ch6.adb, sem_ch6.adb, par-prag.adb, sem_ch8.adb, sem_warn.adb, par-util.adb, styleg.adb: Add stylized comments to error messages that are included in the codefix circuitry of IDE's such as GPS. From-SVN: r147173
2009-05-06[multiple changes]Arnaud Charlet1-3/+5
2009-05-06 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: For Misnamed_Identifiers rule all description of the new form of the rule parameter that allows to specify the suffix for access-to-access type names. 2009-05-06 Robert Dewar <dewar@adacore.com> * sem_warn.adb (Warn_On_Useless_Assignment): Avoid false negative for out parameter assigned when exception handlers are present. * sem_ch5.adb (Analyze_Exit_Statement): Kill current value last assignments on exit. * par-ch9.adb, sem_aggr.adb, par-endh.adb, sem_res.adb, par-ch6.adb, sinput-l.adb, par-load.adb, errout.ads, sem_ch4.adb, lib-load.adb, prj-dect.adb, par-ch12.adb, sem_ch8.adb, par-util.adb, par-ch3.adb, par-tchk.adb, par-ch5.adb: This patch adds stylized comments to error messages that are included in the codefix circuitry of IDE's such as GPS. * sinput.ads, sinput.adb (Expr_First_Char): New function (Expr_Last_Char): New function From-SVN: r147172
2009-04-17[multiple changes]Arnaud Charlet1-4/+3
2009-04-17 Ed Schonberg <schonberg@adacore.com> * atree.ads, atree.adb: Move New_Copy_Tree.to sem_util. * nlists.ads, nlists.adb: Move New_Copy_List to sem_util. * lib-load.adb: Use Copy_Separate_Tree rather than New_Copy_Tree * sem_util.ads, sem_util.adb: New_Copy_Tree and New_Copy_List belong in semantic units, because the handling of itypes in the copied tree requires semantic information that does not belong in atree. 2009-04-17 Robert Dewar <dewar@adacore.com> * par-ch6.adb: Minor reformatting * prj.adb: Minor reformatting From-SVN: r146230
2009-04-17[multiple changes]Arnaud Charlet1-2/+7
2009-04-17 Gary Dismukes <dismukes@adacore.com> * par-ch6.adb (P_Subprogram): Overriding indicators should be allowed on protected subprogram bodies, so exclude the case where Pf_Flags is Pf_Decl_Pbod from the error check. * par-ch9.adb (P_Protected_Operation_Items): Permit overriding indicators on subprograms in protected bodies, and proceed with parsing the subprogram. * sem_ch6.adb (Verify_Overriding_Indicator): Exclude protected subprograms from the check for primitiveness on subprograms with overriding indicators. (Check_Overriding_Indicator): Include protected subprograms in the style check for missing overriding indicators. 2009-04-17 Tristan Gingold <gingold@adacore.com> * init.c: Fix stack checking for x86 Darwin. 2009-04-17 Vincent Celier <celier@adacore.com> * prj-attr.adb: New project level attribute Object_File_Suffix (<language>). * prj-nmsc.adb (Add_Source): Use the object file suffix to get the object file name (Process_Compiler): Process attribute Object_File_Suffix * prj.adb (Object_Name): Use suffix Object_File_Suffix instead of platform suffix, when specified. * prj.ads (Language_Config): New component Object_File_Suffix, defaulted to No_Name. (Object_Name): New parameter Object_File_Suffix, defaulted to No_Name * snames.ads-tmpl: New standard name Object_File_Suffix From-SVN: r146228
2008-08-20Fix copyright notice.Arnaud Charlet1-1/+1
From-SVN: r139296
2008-03-31g-table.adb, [...]: Fix comment typos.Ralf Wildenhues1-1/+1
gcc/ada/ * g-table.adb, g-tasloc.adb, g-traceb.ads, g-trasym.adb, g-utf_32.adb, gen-soccon.c, gigi.h, gmem.c, gnatbind.adb, gnatchop.adb, gnatcmd.adb, gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatlink.adb, gnatmem.adb, gprep.adb, i-cstrea-vms.adb, i-cstrin.adb, i-pacdec.ads, i-vxwork.ads, impunit.adb, init.c, initialize.c, inline.adb, layout.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb, lib-xref.ads, lib.adb, link.c, live.ads, make.adb, makegpr.adb, makeutl.adb, math_lib.adb, mdll-utl.adb, mdll.ads, memroot.adb, memroot.ads, misc.c, mlib-prj.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb, mlib-tgt-tru64.adb, mlib-tgt.ads, namet.adb, namet.h, nlists.adb, nlists.ads, nlists.h, opt.ads, osint-b.ads, osint-c.adb, osint-c.ads, osint.adb, osint.ads, output.ads, par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb, par-sync.adb, par-tchk.adb, par-util.adb, par.adb, prep.adb, prep.ads, prepcomp.adb, prj-attr.ads, prj-dect.adb, prj-env.adb, prj-ext.adb, prj-nmsc.adb, prj-nmsc.ads, prj-pp.adb, prj-proc.adb, prj-strt.ads, prj-tree.ads, prj.adb, prj.ads: Fix comment typos. From-SVN: r133770
2008-03-26par.adb (Check_No_Right_Paren): Removed no longer usedRobert Dewar1-12/+20
2008-03-26 Robert Dewar <dewar@adacore.com> * par.adb (Check_No_Right_Paren): Removed no longer used * par-ch10.adb (N_Pragma): Chars field removed, use Chars (Pragma_Identifier (.. instead. * par-ch10.adb (P_Subunit): Improvement in error recovery and message * par-tchk.adb, par-ch5.adb, par-ch6.adb, par-ch3.adb, par-ch4.adb: Minor improvements in error recovery and messages. * erroutc.adb (Test_Style_Warning_Serious_Msg): Treat style msgs as non-serious * par-ch9.adb: Minor improvements in error recovery and messages (P_Protected): Better error recovery for "protected type x;" * par-util.adb: Minor improvements in error recovery and messages (Check_No_Right_Paren): Removed no longer used From-SVN: r133557