aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
AgeCommit message (Collapse)AuthorFilesLines
2021-07-09[Ada] Add paragraph about representation changes and Scalar_Storage_OrderEric Botcazou1-0/+40
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Scalar_Storage_Order): Add paragraph about representation changes. * gnat_rm.texi: Regenerate.
2021-07-06[Ada] Support for Object.Op subprogram-call notation for untagged typesGary Dismukes1-0/+17
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Add a description of the feature of prefixed-view calls for untagged types to the section on pragma Extensions_Allowed. * gnat_rm.texi: Regenerate. * einfo.ads: Update specification for Direct_Primitive_Operations to reflect its use for untagged types when Extensions_Allowed is True. * gen_il-gen-gen_entities.adb: Allow Direct_Primitive_Operations as a field of untagged classes of types by removing the "Pre" test of "Is_Tagged_Type (N)", and making that field generally available for all types and subtypes by defining it for Type_Kind and removing its specification for individual classes of types. * sem_ch3.adb (Analyze_Full_Type_Declaration): Initialize the Direct_Primitive_Operations list when not already set for the new (sub)type and its base type (except when Ekind of the type is E_Void, which can happen due to errors in cases where Derived_Type_Declaration is called and perhaps in other situations). (Analyze_Subtype_Declaration): Inherit Direct_Primitive_Operations list from the base type, for record and private cases. (Build_Derived_Record_Type): Initialize the Direct_Primitive_Operations list for derived record and private types. (Build_Derived_Type): Initialize the Direct_Primitive_Operations list for derived types (and also for their associated base types when needed). (Process_Full_View): For full types that are untagged record and private types, copy the primitive operations of the partial view to the primitives list of the full view. * sem_ch4.adb (Analyze_Selected_Component): Allow prefixed notation for subprogram calls in the case of untagged types (when Extensions_Allowed is True). In the case where Is_Private_Type (Prefix_Type) is True, call Try_Object_Operation when a discriminant selector wasn't found. Also call Try_Object_Operation in other type kind cases (when Extensions_Allowed is True). (Try_Object_Operation.Try_One_Prefixed_Interpretation): Prevent early return in the untagged case (when Extensions_Allowed is True). Condition main call to Try_Primitive_Operation on the type having primitives, and after that, if Prim_Result is False, test for case where the prefix type is a named access type with primitive operations and in that case call Try_Primitive_Operation after temporarily resetting Obj_Type to denote the access type (and restore it to the designated type after the call) (Try_Object_Operation.Valid_First_Argument_Of): Do matching type comparison by testing Base_Type (Obj_Type) against Base_Type (Typ), rather than against just Typ, to properly handle cases where the object prefix has a constrained subtype. (Fixes a bug discovered while working on this feature.) * sem_ch6.adb (New_Overloaded_Entity.Check_For_Primitive_Subprogram): Add a primitive of an untagged type to the type's list of primitive operations, for both explicit and implicit (derived, so Comes_From_Source is False) subprogram declarations. In the case where the new primitive overrides an inherited subprogram, locate the primitives Elist that references the overridden subprogram, and replace that element of the list with the new subprogram (done by calling the new procedure Add_Or_Replace_Untagged_Primitive on the result type and each formal atype). (Check_For_Primitive_Subprogram.Add_Or_Replace_Untagged_Primitive): New nested procedure to either add or replace an untagged primitive subprogram in a given type's list of primitive operations (replacement happens in case where the new subprogram overrides a primitive of the type). * sem_ch7.adb (New_Private_Type): When Extensions_Allowed is True, initialize the Direct_Primitive_Operations list of a private type to New_Elmt_List in the case of untagged types. * sem_ch8.adb (Find_Selected_Component): In the case where the prefix is an entity name, relax condition that tests Has_Components so that Analyze_Selected_Component will also be called when Extensions_Allowed is True and the prefix type is any type.
2021-07-06[Ada] Add GNAT RM text regarding Ada 2022 default Put_Image implementationSteve Baird1-0/+20
gcc/ada/ * doc/gnat_rm/implementation_of_specific_ada_features.rst: Add a warning indicating that the details of the default (i.e., selected by the compiler) implementation of T'Put_Image for a nonscalar type T are subject to change. * gnat_rm.texi: Regenerate.
2021-06-21[Ada] INOX: prototype "when" constructsJustin Squirek1-0/+17
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document new feature under pragma Extensions_Allowed. * gnat_rm.texi: Regenerate. * errout.adb, errout.ads (Error_Msg_GNAT_Extension): Created to issue errors when parsing extension only constructs. * exp_ch11.adb, exp_ch11.ads (Expand_N_Raise_When_Statement): Created to expand raise ... when constucts. * exp_ch5.adb, exp_ch5.ads (Expand_N_Goto_When_Statement): Created to expand goto ... when constructs. * exp_ch6.adb, exp_ch6.ads (Expand_N_Return_When_Statement): Created to expand return ... when constructs. * expander.adb (Expand): Add case entries for "when" constructs. * gen_il-gen-gen_nodes.adb, gen_il-types.ads: Add entries for "when" constructs. * par-ch11.adb (P_Raise_Statement): Add processing for raise ... when. * par-ch5.adb (Missing_Semicolon_On_Exit): Renamed to Missing_Semicolon_On_When and moved to par-util.adb. * par-ch6.adb (Get_Return_Kind): Renamed from Is_Simple and processing added for "return ... when" return kind. (Is_Simple): Renamed to Get_Return_Kind. (P_Return_Statement): Add case for return ... when variant of return statement. * par-util.adb, par.adb (Missing_Semicolon_On_When): Added to centeralize parsing of "when" keywords in the context of "when" constructs. * sem.adb (Analyze): Add case for "when" constructs. * sem_ch11.adb, sem_ch11.ads (Analyze_Raise_When_Statement): Created to analyze raise ... when constructs. * sem_ch5.adb, sem_ch5.ads (Analyzed_Goto_When_Statement): Created to analyze goto ... when constructs. * sem_ch6.adb, sem_ch6.ads (Analyze_Return_When_Statement): Created to analyze return ... when constructs. * sprint.adb (Sprint_Node_Actual): Add entries for new "when" nodes.
2021-06-21[Ada] Implement 'Valid_Value attributeBob Duff1-0/+9
gcc/ada/ * libgnat/s-valuen.ads, libgnat/s-valuen.adb (Value_Enumeration_Pos): New function to compute the 'Pos of the enumeration literal for a given String. Return a special value instead of raising an exception on invalid input. Called by both Valid_Enumeration_Image and Value_Enumeration. (Valid_Enumeration_Image): Return a Boolean indicating whether the String is a valid Image for the given enumeration type. (Value_Enumeration): Implement in terms of Value_Enumeration_Pos. * libgnat/s-vaenu8.ads, libgnat/s-vaen16.ads, libgnat/s-vaen32.ads: Rename Valid_Enumeration_Image from the instances. * libgnat/s-valuti.ads: Correct documentation (it was not true for the null string). * libgnat/s-valuti.adb (Normalize_String): Do not raise Constraint_Error for the null string, nor strings containing nothing but blanks, so that Valid_Enumeration_Image can return False in these cases, rather than raising an exception. * rtsfind.ads (RE_Value_Enumeration_8, RE_Value_Enumeration_16, RE_Value_Enumeration_32): New functions. (RTE_Available): Improve comment (E doesn't have to be a subprogram, although that's the usual case). * sem_attr.adb (nalid_Value): Semantic analysis for new attribute. * exp_attr.adb: Call Expand_Valid_Value_Attribute for new attribute. * exp_imgv.ads, exp_imgv.adb (Expand_Valid_Value_Attribute): New procedure to expand Valid_Value into a call to Valid_Enumeration_Image_NN. (Expand_Value_Attribute): Misc code cleanups. Remove two ??? mark comments. RTE_Available won't work here. For one thing, RTE_Available (X) shouldn't be called until the compiler has decided to make use of X (see comments on RTE_Available), and in this case we're trying to AVOID calling something. * snames.ads-tmpl: New attribute name. * doc/gnat_rm/implementation_defined_attributes.rst: Document new attribute. * gnat_rm.texi: Regenerate.
2021-06-21[Ada] Fix unbalanced parens in documentation of Address clausesPiotr Trojanek1-1/+1
gcc/ada/ * doc/gnat_rm/representation_clauses_and_pragmas.rst (Address Clauses): Fix unbalanced parens. * gnat_rm.texi: Regenerate.
2021-06-18[Ada] Remove AAMP from compiler sourcesBob Duff4-70/+8
gcc/ada/ * ada_get_targ.adb, aspects.ads, checks.adb, cstand.adb, einfo.ads, exp_attr.adb, freeze.adb, get_targ.adb, libgnat/a-textio.ads, libgnat/g-memdum.ads, libgnat/s-scaval__128.adb, libgnat/s-scaval.adb, make.adb, osint.ads, par-prag.adb, sem_ch13.adb, sem_prag.adb, sem_prag.ads, set_targ.adb, set_targ.ads, snames.ads-tmpl, targparm.ads, types.ads: Remove AAMP-specific code. * switch.ads: Minor reformatting. * gen_il-fields.ads, gen_il-gen.adb, gen_il-gen-gen_entities.adb, gen_il-types.ads, einfo-utils.adb, einfo-utils.ads: Package Types now contains "type Float_Rep_Kind is (IEEE_Binary);", which used to also have an enumeral AAMP. Gen_IL can't handle fields of this type, which would be zero sized. Therefore, we move the Float_Rep field into Einfo.Utils as a synthesized attribute. (We do not delete the field altogether, in case we want new floating-point representations in the future.) * doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_rm/implementation_defined_aspects.rst, doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/the_gnat_compilation_model.rst: Remove AAMP-specific documentation. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2021-06-18[Ada] Add documentation for the array fixed-lower-bound featureGary Dismukes1-3/+47
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation for the array fixed-lower-bound feature. * gnat_rm.texi: Regenerate.
2021-06-18[Ada] Implement basic support for -fdiagnostics-format=jsonGhjuvan Lacambre1-0/+7
gcc/ada/ * back_end.adb (Scan_Back_End_Switches): Set Opt.JSON_Output to True if -fdiagnostics-format=json option is found. * back_end.ads (Scan_Compiler_Arguments): Mention Opt.JSON_Output. * errout.adb (Output_JSON_Message): New procedure. (Output_Messages): If Opt.JSON_Output is True, print messages with new Output_JSON_Message procedure. * opt.ads: Declare JSON_Output variable. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Mention new -fdiagnostics-format option. * gnat_ugn.texi: Regenerate.
2021-06-17[Ada] Casing on composite valuesSteve Baird1-0/+86
gcc/ada/ * exp_ch5.adb (Expand_N_Case_Statement.Expand_General_Case_Statement): New subprogram. (Expand_N_Case_Statement): If extensions are allowed and the case selector is not of a discrete type, then call Expand_General_Case_Statement to generate expansion instead of flagging the non-discrete selector as an error. * sem_case.ads (Is_Case_Choice_Pattern): New Boolean-valued function for testing whether a given expression occurs as part of a case choice pattern. * sem_case.adb (Composite_Case_Ops): New package providing support routines for the new form of case statements. This includes a nested package, Composite_Case_Ops.Value_Sets, which encapsulates the "representative values" implementation of composite value sets. (Check_Choices.Check_Case_Pattern_Choices): New procedure for semantic checking of non-discrete case choices. This includes the checks pertaining to coverage and overlapping. (Check_Choices.Check_Composite_Case_Selector): New procedure for semantic checking of non-discrete case selectors. (Check_Choices): If extensions are allowed then a non-discrete selector type no longer implies that an error must have been flagged earlier. Instead of simply returning, call Check_Composite_Case_Selector and Check_Case_Pattern_Choices. (Is_Case_Choice_Pattern): Body of new function declared in sem_case.ads . * sem_ch5.adb (Analyze_Case_Statement): If extensions are allowed, then we can't use RM 5.4's "The selecting_expression is expected to be of any discrete type" name resolution rule. Handle the case where the type of the selecting expression is not discrete, as well as the new ambiguous-name-resolution error cases made possible by this change. * sem_res.adb (Resolve_Entity_Name): It is ok to treat the name of a type or subtype as an expression if it is part of a case choice pattern, as in "(Field1 => Positive, Field2 => <>)". * exp_aggr.adb (Expand_Record_Aggregate): Do not expand case choice aggregates. * gen_il-fields.ads: Define two new node attributes, Binding_Chars and Multidefined_Bindings. * gen_il-gen-gen_nodes.adb: The new Multidefined_Bindings attribute is Boolean-valued and may be set on N_Case_Statement_Alternative nodes. The new Binding_Chars attribute is Name_Id-valued and may be set on N_Component_Association nodes. * par-ch4.adb (P_Record_Or_Array_Component_Association): When parsing a component association, check for both new syntax forms used to specify a bound value in a case-choice aggregate. In the case of a box value, an identifier may occur within the box, as in "Foo => <Abc>" instead of "Foo => <>". In the more general case, an expression (or a box) may be followed by "is <identifier>", as in "Foo => Bar is Abc" instead of just "Foo => Bar". * sem_aggr.adb (Resolve_Record_Aggregate): Do not transform box component values in a case-choice aggregate. * sinfo.ads: Provide comments for the new attributes added in gen_il-fields.ads. * doc/gnat_rm/implementation_defined_pragmas.rst: Describe this new feature in documentation for pragma Extensions_Allowed. * gnat_rm.texi: Regenerate.
2021-06-17[Ada] Fix punctuation in documentation of warnings for aliasing actualsPiotr Trojanek1-1/+1
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatw.I): Remove double period at the end of sentence. * gnat_ugn.texi: Regenerate.
2021-06-16[Ada] Include info about containers in GNAT RM Implementation Advice sectionSteve Baird1-0/+16
gcc/ada/ * doc/gnat_rm/implementation_advice.rst: Add a section for RM A.18 . * gnat_rm.texi: Regenerate.
2021-06-16[Ada] Clarify the documentation of -gnaty0 style check optionSergey Rybin1-2/+12
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Instead of referring to the formatting of the Ada examples in Ada RM add use the list of checks that are actually performed. * gnat_ugn.texi: Regenerate.
2021-06-15[Ada] No_Task_Parts aspectBob Duff1-0/+13
gcc/ada/ * aspects.ads (No_Task_Parts): New aspect. * snames.ads-tmpl: Add the aspect name. * exp_ch6.adb (Might_Have_Tasks): Return False if this is a class-wide type whose specific type has No_Task_Parts. * freeze.adb (Check_No_Parts_Violations): This is an adaptation of the procedure formerly known as Check_No_Controlled_Parts_Violations, which now supports both No_Controlled_Parts and No_Task_Parts. It takes a parameter indicating which aspect is being checked. (Freeze_Entity): Call Check_No_Parts_Violations for both aspects. * sem_ch13.adb (Analyze_Aspect_Specifications): The code for Aspect_No_Controlled_Parts already works as is with Aspect_No_Task_Parts. * libgnat/a-iteint.ads: Add No_Task_Parts aspect to the two iterator iterfaces. * doc/gnat_rm/implementation_defined_aspects.rst: Add documentation for the No_Task_Parts aspect. * gnat_rm.texi: Regenerate.
2021-06-15[Ada] Clarify the semantics of signed intrinsic shift operationsYannick Moy1-6/+8
gcc/ada/ * doc/gnat_rm/intrinsic_subprograms.rst: More details on shift operations for signed types. Also add the missing Import and Convention on the example. * gnat_rm.texi: Regenerate.
2021-06-15[Ada] Rename Ada 202* to Ada 2022Arnaud Charlet2-3/+17
gcc/ada/ * einfo.ads, errout.adb, errout.ads, exp_aggr.adb, exp_ch5.adb, exp_ch6.adb, exp_ch8.adb, exp_ch9.adb, exp_imgv.adb, exp_put_image.adb, fe.h, impunit.adb, impunit.ads, libgnat/a-cobove.ads, libgnat/a-convec.ads, opt.ads, par-ch12.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb, par-ch6.adb, par-prag.adb, par-util.adb, scans.ads, scng.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_elab.adb, sem_eval.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb, sem_util.ads, sinfo.ads, snames.ads-tmpl, sprint.adb, switch-c.adb, usage.adb, doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_rm/implementation_defined_aspects.rst, gcc-interface/trans.c: Update all references to Ada 2020 to Ada 2022. Rename pragma Ada_2020 to Ada_2022. Update documentation accordingly. * gnat_ugn.texi, gnat_rm.texi: Regenerate.
2021-05-25Fix sphinx-build warning.Martin Liska1-2/+2
RemovedInSphinx40Warning: app.add_lexer() API changed; Please give lexer class instead of instance gcc/ada/ChangeLog: * doc/share/conf.py: Fix Sphinx 4.0.x error.
2021-05-14Port gnat-style to Sphinx.Martin Liska3-2/+695
gcc/ada/ChangeLog: * doc/Makefile: Add gnat-style target. * doc/share/conf.py: Likewise. * doc/gnat-style.rst: New file.
2021-05-12ada: do not use binary mode in conf.pyMartin Liska1-14/+14
gcc/ada/ChangeLog: * doc/share/conf.py: Do not use binary mode. Do not use u' literals as Python3 uses unicode by default.
2021-05-07[Ada] Generate warning for negative literal of a modular typeYannick Moy1-1/+4
gcc/ada/ * opt.ads: Update comment for Warn_On_Suspicious_Modulus_Value. * sem_res.adb (Resolve_Unary_Op): Generate warning. * usage.adb: Refine doc for -gnatw.m/M switch. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update doc on -gnatw.m switch. * gnat_ugn.texi: Regenerate.
2021-05-06[Ada] Document a few more characteristics of floating-point supportEric Botcazou1-8/+17
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst (3.5.7): Mention the IEEE standard explicitly. Use current format names. Document assumed rounding mode and new features of I/O support. * gnat_rm.texi: Regenerate.
2021-05-06[Ada] Add mention of underscore and fix grammar error in doc for -gnatdGary Dismukes1-3/+3
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add mention of underscore and fix grammar error in doc for -gnatd. * gnat_ugn.texi: Regenerate.
2021-05-04[Ada] Fix inconsistent handling of character set control switchesPiotr Trojanek1-1/+1
gcc/ada/ * csets.adb (Initialize): Refactor into CASE statement; raise exception on unsupported code of character set (it will be gently rejected earlier when scanning command line switches). * switch-b.adb (Scan_Binder_Switches): Refactor into a membership expression; add missing '9' choice; reorder as described by GNAT UG, section 4.3.11. * switch-c.adb (Scan_Front_End_Switches): Refactor into a membership expression and reorder as above. * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatic): Mention '5' as an allowed value for "c". * gnat_ugn.texi: Regenerate.
2021-04-29[Ada] Consistent wording for permissible-vs-allowed prefixPiotr Trojanek1-10/+10
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Change all occurrences of "permissible prefix" to "allowed prefix", for consistency. * gnat_rm.texi: Regenerate.
2021-04-28[Ada] Fix the Sphinx configuration and port it to Python3Arnaud Charlet2-16/+88
gcc/ada/ * .gitignore: New. * doc/share/conf.py: Add Python 3 compatibility. * doc/share/gnat.sty: Add missing file.
2020-12-16[Ada] Fix integer-vs-float errors in example for Test_Case pragmaPiotr Trojanek1-2/+2
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Test_Case): Change integer to float literals. * gnat_rm.texi: Regenerate.
2020-12-15[Ada] Small adjustment to parameterization of System.Value_REric Botcazou1-1/+1
gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Minor fix. * gnat_ugn.texi: Regenerate. * libgnat/s-valuer.ads (Precision_Limit): New formal parameter. * libgnat/s-valuer.adb (Precision_Limit): Remove. (Scan_Decimal_Digits): Robustify overflow check. (Scan_Integral_Digits): Likewise. * libgnat/s-valrea.adb: Add assertion on the size of the unsigned type and instantiate System.Value_R with the mantissa limit. (Integer_to_Real): Add Extra parameter and take it into account. (Scan_Real): Pass Extra to Integer_to_Real. (Value_Real): Likewise. * libgnat/s-valued.adb: Add assertion on the size of the unsigned type and instantiate System.Value_R with the mantissa limit. * libgnat/s-valuef.adb: Likewise.
2020-12-14[Ada] Fix documentation of -gnatw.K switch (activates => disables)Gary Dismukes1-1/+1
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Correct documentation of the -gnatw.K switch to say that it disables rather than activates the warning. * gnat_ugn.texi: Regenerate.
2020-11-30[Ada] Expand integer-only implementation of ordinary fixed-point typesEric Botcazou2-11/+30
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Pool_Address): Fix pasto. (Small_Denominator): New entry. (Small_Numerator): Likewise. * doc/gnat_rm/implementation_defined_characteristics.rst (3.5.9): Relax conditions on 128-bit smalls and integer-only implementation. * gnat_rm.texi: Regenerate. * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Fore>: Relax conditions on integer implementation for ordinary fixed-point types and pass a third parameter to the routine. <Attribute_Small_Denominator>: Raise Program_Error. <Attribute_Small_Numerator>: Likewise. * exp_fixd.adb (Expand_Convert_Fixed_To_Fixed): Use a scaled divide if the numerator and denominator of the small ratio are sufficiently small integers. (Expand_Convert_Fixed_To_Integer): Use a scaled divide if numerator and denominator of the small value are sufficiently small integers. (Expand_Convert_Integer_To_Fixed): Likewise. * exp_imgv.adb (Expand_Image_Attribute): Relax the conditions on the integer implementation for ordinary fixed-point types. (Expand_Value_Attribute): Likewise. * freeze.adb (Freeze_Fixed_Point_Type): Relax conditions on 128-bit smalls. * sem_attr.adb (Analyze_Attribute) <Attribute_Small_Denominator>: Check no arguments, fixed-point and set type to Universal_Integer. <Attribute_Small_Numerator>: Likewise. (Eval_Attribute) <Attribute_Small_Denominator>: Fold statically. <Attribute_Small_Numerator>: Likewise. * snames.ads-tmpl (Name_Small_Denominator): New attribute name. (Name_Small_Numerator): Likewise. (Attribute_Id): Add Attribute_Small_{Denominator,Numerator}. * libgnat/a-tifiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-tifiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-wtfiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-wtfiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-ztfiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-ztfiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/s-fore_f.ads (Fore_Fixed): Adjust signature. * libgnat/s-fore_f.adb (Fore_Fixed): Reimplement. * libgnat/s-fofi32.ads (Fore_Fixed32): Adjust signature. * libgnat/s-fofi64.ads (Fore_Fixed64): Likewise. * libgnat/s-fofi128.ads (Fore_Fixed128): Likewise. * libgnat/s-imagef.ads: Adjust description. * libgnat/s-imagef.adb (Maxdigs): Move around. (Set_Image_Integer): Remove assertion. * libgnat/s-valuef.ads: Adjust description. * libgnat/s-valuef.adb (Integer_To_Fixed): Minor tweak.
2020-11-30[Ada] Implement -gnateb switchGhjuvan Lacambre2-0/+11
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Describe -gnateb switch. * doc/gnat_ugn/the_gnat_compilation_model.rst: Mention -gnateb switch in configuration pragma files section. * gnat_ugn.texi: Regenerate. * lib-writ.adb (Write_ALI): Strip directories from configuration files path if needed. * opt.ads: Declare Config_Files_Store_Basename option. * par.adb (Par): Save configuration file checksum. * switch-c.adb (Scan_Front_End_Switches): Set Config_Files_Store_Basename true if -gnateb is present.
2020-11-30[Ada] Add stream-oriented attributes support for 128-bit integer typesEric Botcazou1-0/+3
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-xdr): Document that XDR is not supported for 128-bit integer types. * gnat_ugn.texi: Regenerate. * exp_strm.adb (Build_Elementary_Input_Call): Deal with types larger than Long_Long_Integer. (Build_Elementary_Write_Call): Likewise. * rtsfind.ads (RE_Id): Add RE_I_LLL{I,U] and RE_W_LLL{I,U}. (RE_Unit_Table): Add entries for them. * libgnat/s-stratt.ads (I_LLLI): New inline function. (I_LLLU): Likewise. (W_LLLI): New inline procedure. (W_LLLU): Likewise. * libgnat/s-stratt.adb (S_LLLI): New subtype of SEA. (S_LLLU): Likewise. (From_LLLI): New instance of Unchecked_Conversion. (From_LLLU): Likewise. (To_LLLI): Likewise. (To_LLLU): Likewise. (I_LLLI): Implement. (I_LLLU): Likewise. (W_LLLI): Likewise. (W_LLLU): Likewise.
2020-11-27[Ada] Default_Initial_Condition assertion policy is now RM definedPiotr Trojanek1-27/+27
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: (Assertion_Policy): Move "Default_Initial_Condition" from ID_ASSERTION_KIND to RM_ASSERTION_KIND section. * gnat_rm.texi: Regenerate.
2020-11-27[Ada] Sync doc and code for pragma Assertion_PolicyPiotr Trojanek1-15/+18
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Assertion_Policy): Add "Default_Initial_Condition", "Initial_Condition" and "Subprogram_Variant". * gnat_rm.texi: Regenerate.
2020-11-26[Ada] Add support for 128-bit fixed-point types on 64-bit platformsEric Botcazou1-10/+20
gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Likewise. (GNATRTL_128BIT_OBJS): Likewise. (GNATRTL_128BIT_PAIRS): Add new 128-bit variants. * cstand.adb (Create_Standard): Create Standard_Integer_128. * doc/gnat_rm/implementation_defined_characteristics.rst: Document new limits on 64-bit platforms in entry for 3.5.9(10). * gnat_rm.texi: Regenerate. * exp_attr.adb: Add with and use clauses for Urealp. (Expand_N_Attribute_Reference) <Attribute_Fore>: Call new routines for decimal fixed-point types and common ordinary fixed-point types. * exp_ch4.adb (Real_Range_Check): Extend conversion trick to all ordinary fixed-point types and use Small_Integer_Type_For. * exp_fixd.adb: Add with and use clauses for Ttypes. (Build_Divide): Add special case for 32-bit values and deal with 128-bit types. (Build_Double_Divide): Deal with 128-bit types. (Build_Double_Divide_Code): Likewise. Do not apply conversions before calling Build_Multiply. (Build_Multiply): Likewise. Add special case for 32-bit values. (Build_Scaled_Divide): Deal with 128-bit types. (Build_Scaled_Divide_Code): Likewise. Fix size computation. Do not apply conversions before calling Build_Multiply. (Do_Multiply_Fixed_Fixed): Minor tweak. (Integer_Literal): Deal with 128-bit values. * exp_imgv.adb (Has_Decimal_Small): Delete. (Expand_Image_Attribute): Call new routines for common ordinary fixed-point types. (Expand_Value_Attribute): Likewise. (Expand_Width_Attribute): Add new expansion for fixed-point types. * freeze.adb (Freeze_Entity): Move error checks for ordinary fixed-point types to... (Freeze_Fixed_Point_Type): ...here. Deal with 128-bit types and adjust limitations for 32-bnt and 64-bit types. * rtsfind.ads (RTU_Id): Add entries for new System_Fore, System_Img, and System_Val units and remove them for obsolete units. (RE_Id): Add entries for Double_Divide128, Scaled_Divide128, the new Fore, Image, Value routines and remove them for obsolete units. (RE_Unit_Table): Likewise. * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration): Deal with 128-bit types. * stand.ads (Standard_Entity_Type): Add Standard_Integer_128. * uintp.ads (Uint_31): New deferred constant. (Uint_Minus_18): Likewise. (Uint_Minus_31): Likewise. (Uint_Minus_76): Likewise. (Uint_Minus_127): Likewise. * urealp.ads (Ureal_2_31): New function. (Ureal_2_63): Likewise. (Ureal_2_127): Likewise. (Ureal_2_M_127): Likewise. (Ureal_2_10_18): Likewise. (Ureal_M_2_10_18): Likewise. (Ureal_9_10_36): Likewise. (Ureal_M_9_10_36): Likewise. (Ureal_10_76): Likewise. (Ureal_M_10_76): Likewise. (Ureal_10_36): Delete. (Ureal_M_10_36): Likewise. * urealp.adb (UR_2_10_18): New variable. (UR_9_10_36): Likewise. (UR_10_76): Likewise. (UR_M_2_10_18): Likewise. (UR_M_9_10_36): Likewise. (UR_M_10_76): Likewise. (UR_2_31): Likewise. (UR_2_63): Likewise. (UR_2_127): Likewise. (UR_2_M_127): Likewise. (UR_10_36): Delete. (UR_M_10_36): Likewise. (Initialize): Initialize them. (UR_Write): Do not use awkward Ada literal style. (Ureal_2_10_18): New function. (Ureal_9_10_36): Likewise. (Ureal_10_76): Likewise. (Ureal_2_31): Likewise. (Ureal_2_63): Likewise. (Ureal_2_127): Likewise. (Ureal_2_M_127): Likewise. (Ureal_M_2_10_18): Likewise. (Ureal_M_9_10_36): Likewise. (Ureal_10_76): Likewise. (Ureal_M_10_76): Likewise. (Ureal_10_36): Delete. (Ureal_M_10_36): Likewise. * libgnat/a-decima__128.ads: New file. * libgnat/a-tideau.ads, libgnat/a-tideau.adb: Reimplement as generic unit. * libgnat/a-tideio.adb: Reimplement. * libgnat/a-tideio__128.adb: New file. * libgnat/a-tifiau.ads, libgnat/a-tifiau.adb: New generic unit. * libgnat/a-tifiio.adb: Move bulk of implementation to s-imagef and reimplement. * libgnat/a-tifiio__128.adb: New file. * libgnat/a-tiflau.adb (Get): Minor consistency fix. (Gets): Likewise. * libgnat/a-wtdeau.ads, libgnat/a-wtdeau.adb: Reimplement as generic unit. * libgnat/a-wtdeio.adb: Reimplement. * libgnat/a-wtdeio__128.adb: New file. * libgnat/a-wtfiau.ads, libgnat/a-wtfiau.adb: New generic unit. * libgnat/a-wtfiio.adb: Reimplement. * libgnat/a-wtfiio__128.adb: New file. * libgnat/a-ztdeau.ads, libgnat/a-ztdeau.adb: Reimplement as generic unit. * libgnat/a-ztdeio.adb: Reimplement. * libgnat/a-ztdeio__128.adb: New file. * libgnat/a-ztfiau.ads, libgnat/a-ztfiau.adb: New generic unit. * libgnat/a-ztfiio.adb: Reimplement. * libgnat/a-ztfiio__128.adb: New file. * libgnat/g-rannum.adb (Random_Decimal_Fixed): Use a subtype of the appropiate size for the instantiation. (Random_Ordinary_Fixed): Likewise. * libgnat/s-arit32.ads, libgnat/s-arit32.adb: New support unit. * libgnat/s-fode128.ads: New instantiation. * libgnat/s-fode32.ads: Likewise. * libgnat/s-fode64.ads: Likewise. * libgnat/s-fofi128.ads: Likewise. * libgnat/s-fofi32.ads: Likewise. * libgnat/s-fofi64.ads: Likewise. * libgnat/s-fore_d.ads, libgnat/s-fore_d.adb: New generic unit. * libgnat/s-fore_f.ads, libgnat/s-fore_f.adb: Likewise. * libgnat/s-fore.ads, libgnat/s-fore.adb: Rename into... * libgnat/s-forrea.ads, libgnat/s-forrea.adb: ...this. * libgnat/s-imaged.ads, libgnat/s-imaged.adb: New generic unit. * libgnat/s-imagef.ads, libgnat/s-imagef.adb: Likewise, taken from a-tifiio.adb. * libgnat/s-imde128.ads: New instantiation. * libgnat/s-imde32.ads: Likewise. * libgnat/s-imde64.ads: Likewise. * libgnat/s-imfi128.ads: Likewise. * libgnat/s-imfi32.ads: Likewise. * libgnat/s-imfi64.ads: Likewise. * libgnat/s-imgdec.ads, libgnat/s-imgdec.adb: Delete. * libgnat/s-imglld.ads, libgnat/s-imglld.adb: Likewise. * libgnat/s-imgrea.adb (Set_Image_Real): Replace Sign local variable with Minus local variable for the sake of consistency. * libgnat/s-imguti.ads, libgnat/s-imguti.adb: New support unit. * libgnat/s-vade128.ads: New instantiation. * libgnat/s-vade32.ads: Likewise. * libgnat/s-vade64.ads: Likewise. * libgnat/s-vafi128.ads: Likewise. * libgnat/s-vafi32.ads: Likewise. * libgnat/s-vafi64.ads: Likewise. * libgnat/s-valdec.ads, libgnat/s-valdec.adb: Delete. * libgnat/s-vallld.ads, libgnat/s-vallld.adb: Likewise. * libgnat/s-valued.ads, libgnat/s-valued.adb: New generic unit. * libgnat/s-valuef.ads, libgnat/s-valuef.adb: Likewise. * libgnat/s-valuei.adb: Minor rewording. * libgnat/s-valrea.adb: Move bulk of implementation to... * libgnat/s-valuer.ads, libgnat/s-valuer.adb: ...here. New generic unit. * libgnat/system-aix.ads (Max_Mantissa): Adjust. * libgnat/system-darwin-arm.ads (Max_Mantissa): Likewise. * libgnat/system-darwin-ppc.ads (Max_Mantissa): Likewise. * libgnat/system-darwin-x86.ads (Max_Mantissa): Likewise. * libgnat/system-djgpp.ads (Max_Mantissa): Likewise. * libgnat/system-dragonfly-x86_64.ads (Max_Mantissa): Likewise. * libgnat/system-freebsd.ads (Max_Mantissa): Likewise. * libgnat/system-hpux-ia64.ads (Max_Mantissa): Likewise. * libgnat/system-hpux.ads (Max_Mantissa): Likewise. * libgnat/system-linux-alpha.ads (Max_Mantissa): Likewise. * libgnat/system-linux-arm.ads (Max_Mantissa): Likewise. * libgnat/system-linux-hppa.ads (Max_Mantissa): Likewise. * libgnat/system-linux-ia64.ads (Max_Mantissa): Likewise. * libgnat/system-linux-m68k.ads (Max_Mantissa): Likewise. * libgnat/system-linux-mips.ads (Max_Mantissa): Likewise. * libgnat/system-linux-ppc.ads (Max_Mantissa): Likewise. * libgnat/system-linux-riscv.ads (Max_Mantissa): Likewise. * libgnat/system-linux-s390.ads (Max_Mantissa): Likewise. * libgnat/system-linux-sh4.ads (Max_Mantissa): Likewise. * libgnat/system-linux-sparc.ads (Max_Mantissa): Likewise. * libgnat/system-linux-x86.ads (Max_Mantissa): Likewise. * libgnat/system-lynxos178-ppc.ads (Max_Mantissa): Likewise. * libgnat/system-lynxos178-x86.ads (Max_Mantissa): Likewise. * libgnat/system-mingw.ads (Max_Mantissa): Likewise. * libgnat/system-qnx-aarch64.ads (Max_Mantissa): Likewise. * libgnat/system-rtems.ads (Max_Mantissa): Likewise. * libgnat/system-solaris-sparc.ads (Max_Mantissa): Likewise. * libgnat/system-solaris-x86.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-arm-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-arm-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-arm.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-e500-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-e500-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-e500-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-e500-vthread.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc-ravenscar.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc-vthread.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-ppc.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-x86-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-x86-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-x86-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-x86-vthread.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks-x86.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-aarch64-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-aarch64.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-arm-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-arm.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-e500-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-e500-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-e500-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-ppc-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-ppc-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-ppc-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-ppc64-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-ppc64-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-x86-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-x86-rtp-smp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-x86-rtp.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-x86_64-kernel.ads (Max_Mantissa): Likewise. * libgnat/system-vxworks7-x86_64-rtp-smp.ads (Max_Mantissa): Likewise. gcc/testsuite/ * gnat.dg/multfixed.adb: Robustify.
2020-11-25[Ada] Document attribute Has_Tagged_Values in GNAT RMPiotr Trojanek1-0/+13
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Has_Tagged_Values): Document based on the existing description of Has_Access_Type and the comment for Has_Tagged_Component, which is where frontend evaluates this attribute. * gnat_rm.texi: Regenerate. * sem_attr.adb (Analyze_Attribute): Merge processing of Has_Access_Type and Has_Tagged_Component attributes. * sem_util.adb (Has_Access_Type): Fix casing in comment. * sem_util.ads (Has_Tagged_Component): Remove wrong (or outdated) comment about the use of this routine to implement the equality operator.
2020-11-25[Ada] Crash on right shift operator for signed integersJustin Squirek1-1/+3
gcc/ada/ * doc/gnat_rm/intrinsic_subprograms.rst (Shifts and Rotates): Document behavior on negative numbers * gnat_rm.texi: Regenerate. * sem_eval.adb (Fold_Shift): Set modulus to be based on the RM size for non-modular integer types.
2020-11-24[Ada] Documentation: update -gnatyk descriptionGhjuvan Lacambre1-1/+2
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update documentation on -gnatyk. * gnat_ugn.texi: Regenerate.
2020-11-24[Ada] Document characteristics of decimal fixed point typesEric Botcazou1-1/+3
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Complete entry of 3.5.9(10). * gnat_rm.texi: Regenerate.
2020-10-26[Ada] Replace GNAT_Extended_Ravenscar profile namePat Rogers1-9/+16
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Include "Jorvik" in pragma Profile description. * gnat_rm.texi: Regenerate.
2020-10-26[Ada] Document characteristics of ordinary fixed point typesEric Botcazou1-7/+8
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Adjust the entries of 3.5.9(8) and 3.5.9(10). * gnat_rm.texi: Regenerate.
2020-10-26[Ada] gnatpp: Document that --no-comments-fill is now the defaultBob Duff1-2/+2
gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Document that --no-comments-fill is now the default.
2020-10-26[Ada] AI12-0395: Allow aspect_specifications on formal parametersArnaud Charlet1-1/+1
gcc/ada/ * par-ch6.adb (P_Formal_Part): Ada 2020 supports scanning aspects on formal parameters. * doc/gnat_rm/implementation_defined_aspects.rst (Aspect Unreferenced): Update documentation. * gnat_rm.texi: Regenerate.
2020-10-23[Ada] gnatpp: Document --no-comments-fillBob Duff1-2/+3
gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Document --no-comments-fill.
2020-10-23[Ada] Implement new legality rules introduced in C.6(12) by AI12-0363Eric Botcazou1-6/+0
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Remove uage restrictions in conjunction with Atomic and Aliased. * gnat_rm.texi: Regenerate. * aspects.ads (Aspect_Id): Add Aspect_Full_Access_Only. (Is_Representation_Aspect): Likewise. (Aspect_Names): Likewise. (Aspect_Delay): Likewise. * einfo.ads (Is_Atomic_Or_VFA): Rename into... (Is_Full_Access): ...this. (Is_Volatile_Full_Access): Document new usage for Full_Access_Only. * einfo.adb (Is_Atomic_Or_VFA): Rename into... (Is_Full_Access): ...this. * freeze.ads (Is_Atomic_VFA_Aggregate): Rename into... (Is_Full_Access_Aggregate): ...this. * freeze.adb (Is_Atomic_VFA_Aggregate): Rename into... (Is_Full_Access_Aggregate): ...this. Adjust to above renaming. (Freeze_Array_Type): Likewise. (Freeze_Entity): Likewise. * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Likewise. (Expand_Record_Aggregate): Likewise. * exp_ch4.adb (Expand_N_Op_Eq): Likewise. * exp_ch5.adb (Expand_Assign_Array): Likewise. * exp_ch8.adb (Evaluation_Required): Likewise. * layout.adb (Layout_Type): Likewise. (Set_Composite_Alignment): Likewise. * sem_aux.ads (Has_Rep_Item): Delete. * sem_aux.adb (Has_Rep_Item): Likewise. * sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Implement new legality rules in C.6(12). * sem_ch12.adb (Instantiate_Object): Likewise. * sem_res.adb (Resolve_Actuals): Likewise. * sem_ch13.adb (Inherit_Delayed_Rep_Aspects): Deal with aspect Full_Access_Only. (Check_False_Aspect_For_Derived_Type): Likewise. (Make_Pragma_From_Boolean_Aspect): Test for the presence of Expr. Deal with aspect Full_Access_Only. (Analyze_Aspects_At_Freeze_Point): Likewise. (Analyze_One_Aspect): Do not set Delay_Required to true even for Always_Delay boolean aspects if they have no expression. Force Delay_Required to true for aspect Full_Access_Only in all cases. Reject aspect Full_Access_Only if not in Ada 2020 mode. (Check_Aspect_At_End_Of_Declarations): Deal with empty expression. (Check_Aspect_At_Freeze_Point): Likewise. (Rep_Item_Entity): Delete. (Inherit_Aspects_At_Freeze_Point): Align handling for Bit_Order with that for Scalar_Storage_Order. * sem_prag.adb (Check_Atomic_VFA): Delete. (Check_VFA_Conflicts): Likewise. (Check_Full_Access_Only): New procedure. (Process_Atomic_Independent_Shared_Volatile): Call to implement the new legality checks in C.6(8/2) and mark the entity last. (Analyze_Pragma) <Pragma_Atomic_Components>: Remove obsolete check. * sem_util.ads (Is_Atomic_Or_VFA_Object): Rename into... (Is_Full_Access_Object): ...this. (Is_Subcomponent_Of_Atomic_Object): Rename into... (Is_Subcomponent_Of_Full_Access_Object): ...this. * sem_util.adb (Inherit_Rep_Item_Chain): Use Present_In_Rep_Item. (Is_Atomic_Or_VFA_Object): Rename into... (Is_Full_Access_Object): ...this. (Is_Subcomponent_Of_Atomic_Object): Rename into... (Is_Subcomponent_Of_Full_Access_Object): ...this and adjust. * snames.ads-tmpl (Name_Full_Access_Only): New name of aspect. * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust for renaming. (promote_object_alignment): Likewise. (gnat_to_gnu_field): Likewise. Rename local variable and use specific qualifier in error message for Volatile_Full_Access. * gcc-interface/trans.c (lvalue_required_p): Likewise.
2020-10-23[Ada] Improve documentation of pragma Abort_DeferArnaud Charlet1-1/+15
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Improve documentation of pragma Abort_Defer. * gnat_rm.texi: Regenerate.
2020-10-22[Ada] Enable the support of 128-bit integer types by defaultEric Botcazou1-46/+49
gcc/ada/ * Makefile.rtl (GNATRTL_128BIT_PAIRS): Add i-cexten.ads. * debug.adb (d.H): Document new usage. * doc/gnat_rm/representation_clauses_and_pragmas.rst (Size Clauses): Document new limit on 64-bit platforms. (Component_Size Clauses): Likewise. (Pragma Pack for Arrays): Likewise. (Pragma Pack for Records): Likewise. (Record Representation Clauses): Likewise. * gnat_rm.texi: Regenerate. * gnat1drv.adb (Adjust_Global_Switches): Rewrite code enabling or disabling the support for 128-bit integer types. * switch-c.adb (Scan_Front_End_Switches): Do not deal with e128. * usage.adb (Write_Switch_Char): Do not print -gnate128 switch. * libgnat/i-cexten__128.ads: New file. gcc/testsuite/ * ada/acats/run_all.sh: Define and substitute target_{max,min}_int. * ada/acats/support/macro.dfs: Parameterize {MAX,MIN}_INT. * gnat.dg/assert1.adb: Adjust conditionally to 128-bit integer types. * gnat.dg/size_clause1.adb: Do not expect a warning for LP64 targets. * gnat.dg/warn11.adb: Likewise. * gnat.dg/specs/rep_clause5.ads (Array_2_Type): Add alignment clause.
2020-10-22[Ada] Minor fix in GNAT RMEric Botcazou1-5/+5
gcc/ada/ * doc/gnat_rm/implementation_advice.rst: Minor fix. * gnat_rm.texi: Regenerate.
2020-10-22[Ada] Minor fixes in GNAT RMEric Botcazou1-4/+3
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Minor fixes. * gnat_rm.texi: Regenerate.
2020-10-21[Ada] Document Long_Long_Long_Integer in implementation characteristicsEric Botcazou1-11/+13
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Add Long_Long_Long_Integer to the list of predefined integer types. * gnat_rm.texi: Regenerate.
2020-10-20[Ada] Add support for Unreferenced aspect on formal parametersArnaud Charlet1-3/+5
gcc/ada/ * aspects.adb (Has_Aspect_Specifications_Flag): Add N_Parameter_Specification. * par-ch13.adb (Aspect_Specifications_Present): Also handle case of an unknown aspect on the last formal parameter (terminated by a Tok_Right_Paren). Minor reformatting. * par-ch6.adb (P_Formal_Part): Scan aspects on formal parameters. * par.adb: Fix typos. * sem_ch6.adb (Process_Formals): Add processing of aspects and in particular Unreferenced aspect for now. * sinfo.ads: Allow ASPECT_SPECIFICATIONS on a PARAMETER_SPECIFICATION. * doc/gnat_rm/implementation_defined_aspects.rst (Aspect Unreferenced): Update documentation. * gnat_rm.texi: Regenerate.