aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
AgeCommit message (Collapse)AuthorFilesLines
2022-11-14Revert "sphinx: ada: port to Sphinx"Martin Liska16-206/+732
This reverts commit 0a543515957ff47feba739e6f71062fb2fb99125.
2022-11-14Revert "sphinx: fix cross manual references"Martin Liska1-2/+1
This reverts commit 72318642439703bba8c83423d4706e06444254d6.
2022-11-09sphinx: fix cross manual referencesMartin Liska1-1/+2
gcc/ada/ChangeLog: * doc/gnat_rm/index.rst: Fix cross manual refs. gcc/ChangeLog: * doc/gcc/gcc-command-options/options-controlling-the-kind-of-output.rst: Fix cross manual refs. * doc/gcc/language-standards-supported-by-gcc/references-for-other-languages.rst: Likewise. gcc/jit/ChangeLog: * doc/internals/index.rst: Fix cross manual refs. * doc/topics/contexts.rst: Likewise.
2022-11-09sphinx: ada: port to SphinxMartin Liska16-732/+206
gcc/ada/ChangeLog: * doc/gnat-style.rst: Moved to... * doc/gnat-style/index.rst: ...here. * doc/gnat_rm.rst: Moved to... * doc/gnat_rm/index.rst: ...here. * doc/gnat_ugn.rst: Moved to... * doc/gnat_ugn/index.rst: ...here. * doc/share/latex_elements.py: Moved to... * doc/share/ada_latex_elements.py: ...here. * gcc-interface/Make-lang.in: * doc/Makefile: Removed. * doc/share/conf.py: Removed. * doc/share/gnu_free_documentation_license.rst: Removed. * gnat-style.texi: Removed. * gnat_rm.texi: Removed. * gnat_ugn.texi: Removed. * doc/gnat-style/conf.py: New file. * doc/gnat-style/gnu_free_documentation_license.rst: New file. * doc/gnat_rm/conf.py: New file. * doc/gnat_rm/gnu_free_documentation_license.rst: New file. * doc/gnat_ugn/conf.py: New file. * doc/gnat_ugn/gnu_free_documentation_license.rst: New file. * doc/share/adabaseconf.py: New file. * doc/gnat_rm/security_hardening_features.rst: Add role. * doc/gnat_ugn/platform_specific_information.rst: Remove duplicate definition of |nbsp|.
2022-11-08ada: Align -gnatwc's documentation with its behaviorRonan Desplanques1-1/+1
Shortly after the -gnatwc flag was introduced, its behavior was tweaked, but its documentation was not updated accordingly. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnatwc): Fix flag documentation. * gnat_ugn.texi: Regenerate.
2022-11-07ada: Document that gprof won't work on windows with PIE.Cedric Landet1-2/+6
Document that gprof won't work on windows with PIE and -no-pie must be used. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Mention the needed -no-pie for windows to use gprof. * gnat_ugn.texi: Regenerate.
2022-11-07ada: New warning about noncomposing user-defined "="Bob Duff1-0/+21
Print warning for a user-defined "=" that does not compose as might be expected (i.e. is ignored for predefined "=" of a containing record or array type). This warning is enabled by -gnatw_q; we don't enable it by default because it generates too many false positives. We also don't enable it via -gnatwa. gcc/ada/ * exp_ch4.adb (Expand_Array_Equality): Do not test Ltyp = Rtyp here, because that is necessarily true. Move assertion thereof to more general place. (Expand_Composite_Equality): Pass in Outer_Type, for use in warnings. Rename Typ to be Comp_Type, to more clearly distinguish it from Outer_Type. Print warning when appropriate. * exp_ch4.ads: Minor comment fix. * errout.ads: There is no such pragma as Warning_As_Pragma -- Warning_As_Error must have been intended. Improve comment for ?x?. * exp_ch3.adb (Build_Untagged_Equality): Update comment to be accurate for more recent versions of Ada. * sem_case.adb (Choice_Analysis): Declare user-defined "=" functions as abstract. * sem_util.ads (Is_Bounded_String): Give RM reference in comment. * warnsw.ads, warnsw.adb (Warn_On_Ignored_Equality): Implement new warning switch -gnatw_q. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document new warning switch. * gnat_ugn.texi: Regenerate.
2022-11-04ada: Static intrinsic functions are a core language extension.Steve Baird1-0/+2
GNAT-defined Ada extensions are divided into two categories: those that are enabled by either -gnatX or -gnatX0 and those which require -gnatX0. Move static intrinsic functions from the second category into the first. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Add the standard '... "On" enables this extension.' sentence to the description of static intrinsic functions. * sem_ch13.adb (Analyze_Aspect_Spec): In the call to Error_Msg_GNAT_Extension for a Static aspect specification for an intrinsic function, specify Is_Core_Extension => True. * sem_eval.adb (Eval_Intrinsic_Call): Test Core_Extensions_Allowed instead of testing All_Extensions_Allowed. * gnat_rm.texi: Regenerate.
2022-11-04ada: Fix various typos in GNAT User's GuidePiotr Trojanek3-10/+11
Fix uncontroversial typos. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix typos. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Fix typos and refill as necessary; remove trailing whitespace. * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typos. * gnat_ugn.texi: Regenerate.
2022-11-04ada: Fix typoRonan Desplanques1-1/+1
Fix typo in documentation. gcc/ada/ * doc/gnat_rm/standard_library_routines.rst: Fix typo. * gnat_rm.texi: Regenerate.
2022-11-04ada: Fix various typos in GNAT RMPiotr Trojanek5-11/+11
List of unknown words in files can be produced with: $ cat *.rst | ispell -l | tr '[:upper:]' '[:lower:]' | sort | uniq | less and can be easily filtered with eyes. gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst: Fix typos. * doc/gnat_rm/implementation_defined_attributes.rst: Likewise * doc/gnat_rm/implementation_defined_characteristics.rst: Likewise * doc/gnat_rm/implementation_defined_pragmas.rst: Likewise * doc/gnat_rm/standard_library_routines.rst: Likewise. * gnat_rm.texi: Regenerate.
2022-11-04ada: Allow enabling a restricted set of language extensions.Steve Baird2-15/+36
The -gnatX switch (and the related Extensions_Allowed pragma) is currently a two-valued all-or-nothing option. Add support for enabling a curated subset of language extensions without enabling others via the -gnatX switch and for enabling all language extensions via the new -gnatX0 switch. Similarly, the existing "ON" argument for the Extensions_Allowed pragma now only enables the curated subset; the new argument "ALL" enables all language extensions. The subset of language extensions currently includes prefixed-view notation with an untagged prefix, fixed-low-bound array subtypes, and casing on composite values. gcc/ada/ * opt.ads: Replace Ada_Version_Type enumeration literal Ada_With_Extensions with two literals, Ada_With_Core_Extensions and Ada_With_All_Extensions. Update uses of the deleted literal. Replace Extensions_Allowed function with two functions: All_Extensions_Allowed and Core_Extensions_Allowed. * errout.ads, errout.adb: Add Boolean parameter to Error_Msg_GNAT_Extension to indicate whether the construct in question belongs to the curated subset. * exp_ch5.adb, par-ch4.adb, sem_case.adb, sem_ch3.adb: * sem_ch4.adb, sem_ch5.adb, sem_ch8.adb: Replace calls to Extensions_Allowed with calls to Core_Extensions_Allowed for constructs that are in the curated subset. * sem_attr.adb, sem_ch13.adb, sem_eval.adb, sem_util.adb: Replace calls to Extensions_Allowed with calls to All_Extensions_Allowed for constructs that are not in the curated subset. * par-ch3.adb: Override default for new parameter in calls to Error_Msg_GNAT_Extension for constructs in the curated subset. * par-prag.adb: Add Boolean parameter to Check_Arg_Is_On_Or_Off to also allow ALL. Set Opt.Ada_Version appropriately for ALL or ON arguments. * sem_prag.adb: Allowed ALL argument for an Extensions_Allowed pragma. Set Opt.Ada_Version appropriately for ALL or ON arguments. * switch-c.adb: The -gnatX switch now enables only the curated subset of language extensions (formerly it enabled all of them); the new -gnatX0 switch enables all of them. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document new "-gnatX0" switch and update documentation for "-gnatX" switch. * doc/gnat_rm/implementation_defined_pragmas.rst: Document new ALL argument for pragma Extensions_Allowed and update documentation for the ON argument. Delete mention of Ada 2022 Reduce attribute as an extension. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2022-11-04ada: Remove VxWorks 6 and VxWorks 653 2.x content from the UGXCedric Landet1-1/+1
Because they are not supported anymore. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Remove VxWorks version 6. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2022-10-06ada: Cleanup related to lock-free protected subprogramsPiotr Trojanek1-3/+3
Cleanup code and documentation; semantics is unaffected. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Lock_Free): Remove inconsistent periods that end item descriptions. * sem_ch9.adb (Allows_Lock_Free_Implementation): Remove unnecessary guard against an empty list of parameters; replace low-level entity kind membership test with a high-level query; refill error message. * gnat_rm.texi: Regenerate.
2022-10-06ada: hardened conditionals: exemplify codegen changesAlexandre Oliva1-2/+49
gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in hardened conditionals. * gnat_rm.texi: Regenerate.
2022-10-06ada: hardened booleans: exemplify codegen changesAlexandre Oliva1-4/+25
Show the sort of code that is to be expected from using hardened booleans in Ada code. Mention that C traps instead of raising exceptions. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in hardened booleans. Mention that C traps where Ada raises exceptions. * gnat_rm.texi: Regenerate.
2022-10-06ada: stack scrubbing: exemplify codegen changesAlexandre Oliva1-0/+52
gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Add examples of codegen changes in stack scrubbing. * gnat_rm.texi: Regenerate.
2022-09-26ada: Doc: rename Valid_Image to Valid_ValueGhjuvan Lacambre1-4/+4
This renaming happened some time ago in the code, but the documentation was not updated. gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Rename Valid_Image. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2022-09-26ada: Document Long_Long_Long_Size parameter for -gnateTEric Botcazou1-0/+2
This was overlooked when the new parameter was created. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnateT): Document new parameter Long_Long_Long_Size. * gnat_ugn.texi: Regenerate.
2022-09-26ada: Document support for the mold linkerKévin Le Gouguec1-3/+25
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Linker Switches): Document support for mold along with gold; add some advice regarding OpenSSL in the Pro version. * gnat_ugn.texi: Regenerate.
2022-09-26ada: Remove GNATmetric's documentation from GNAT's documentationBoris Yakobowski1-1119/+1
gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Remove documentation for gnatmetric.
2022-09-12[Ada] Sync documentation of junk names with codePiotr Trojanek1-1/+1
The list of junk entity names for which warnings are suppressed has been recently modified, so update the documentation accordingly. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pragma Unreferenced): Sync description with Sem_Warn.Has_Junk_Name routine. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2022-09-12[Ada] Remove SPARK containers from GNAT documentationJoffrey Huguet1-219/+0
This patch removes documentation on the SPARK containers, now under the spark2014 repository. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Remove paragraphs about SPARK containers. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2022-09-12[Ada] Lock_Free aspect takes precedence over Ceiling_Locking locking policySteve Baird1-1/+6
Allow the Lock_Free aspect of a protected type to be True (but only by explicit specification) if Ceiling_Locking locking policy has been specified. Clarify that the Lock_Free aspect takes precedence over the Ceiling_Locking policy in that case. gcc/ada/ * sem_ch9.adb (Satisfies_Lock_Free_Requirements): If Ceiling_Locking locking policy has been specified, then either return False (if Lock_Free was not explicitly specified) or generate a warning that ceiling locking will not be implemented for this protected unit (if Lock_Free was explicitly specified). Generate an error message (in addition to returning False) if an explicit Lock_Free aspect specification is rejected because atomic primitives are not supported on the given target. * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify that the Lock_Free aspect for a protected unit takes precedence over the Ceiling_Locking locking policy in the case where both apply. * gnat_rm.texi: Regenerate.
2022-09-06[Ada] Enable lock free protected implementation by defaultSteve Baird1-7/+0
In the past, the Lock_Free aspect of a protected type (including an anonymous type) defaulted to False. In the case where an explicit "Lock_Free => True" aspect specification would be legal, the aspect now defaults to True (which means that a lock-free implementation is used to implement the type's protected operations); this is like the previous behavior of the compiler with the -gnatd9 switch specified. Support for the Lock_Free attribute (which should not be confused with the Lock_Free aspect) is removed. gcc/ada/ * debug.adb: Remove comment regarding the -gnatd9 switch. * doc/gnat_rm/implementation_defined_attributes.rst: Remove all mention of the Lock_Free attribute. * gnat_rm.texi, gnat_ugn.texi: Regenerate. * exp_attr.adb, sem_attr.adb: Remove all mention of the former Attribute_Lock_Free enumeration element of the Attribute_Id type. * sem_ch9.adb (Allows_Lock_Free_Implementation): Remove the Debug_Flag_9 test. Return False in the case of a protected function whose result type requires use of the secondary stack. (Satisfies_Lock_Free_Requirements): This functions checks for certain constructs and returns False if one is found. In the case of a protected function, there is no need to check to see if the protected object is being modified. So it is ok to omit *some* checks in the case of a protected function. But other checks which are required (e.g., the test for a reference to a variable that is not part of the protected object) were being incorrectly omitted. This could result in accepting "Lock_Free => True" aspect specifications that should be rejected. * snames.adb-tmpl: Name_Lock_Free no longer requires special treatment in Get_Pragma_Id or Is_Pragma_Name (because it is no longer an attribute name). * snames.ads-tmpl: Move the declaration of Name_Lock_Free to reflect the fact that it is no longer the name of an attribute. Delete Attribute_Lock_Free from the Attribute_Id enumeration type.
2022-09-06[Ada] Improve documentation of validation checking control switchesSteve Baird1-37/+44
Correct incorrect text and clarify unclear text that has been identified in the "Validity Checking" section of the GNAT UG. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Improve -gnatVa, -gnatVc, -gnatVd, -gnatVe, -gnatVf, -gnatVo, -gnatVp, -gnatVr, and -gnatVs switch descriptions. * gnat_ugn.texi: Regenerate.
2022-09-06[Ada] Document change to legality checks for Inox case statementsSteve Baird1-1/+2
INOX (which is enabled via -gnatX) supports composite case-statement selectors. As a temporary measure, simplify the coverage-related compile-time checks for such case statements via two changes: an others choice is always required for such a case statement, and no legality checks relating to overlapping of case choices are performed. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document new temporary rule that a "when others =>" case choice must be given when casing on a composite selector. * gnat_rm.texi: Regenerate.
2022-09-06[Ada] Improve detection of illegal Iterable aspectsPiotr Trojanek1-6/+10
Handling of aspect Iterable was lacking guards against illegal code, so the compiler either crashed or emitted cryptic errors while expanding loops that rely on this aspect. gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst (Aspect Iterable): Include Last and Previous primitives in syntactic and semantic description. * exp_attr.adb (Expand_N_Attribute_Reference): Don't expect attributes like Iterable that can only appear in attribute definition clauses. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Prevent crash on non-aggregate Iterable attribute; improve basic diagnosis of attribute values. (Resolve_Iterable_Operation): Improve checks for illegal primitives in aspect Iterable, e.g. with wrong number of formal parameters. (Validate_Iterable_Aspect): Prevent crashes on syntactically illegal aspect expression. * sem_util.adb (Get_Cursor_Type): Fix style. * gnat_ugn.texi, gnat_rm.texi: Regenerate.
2022-09-05[Ada] New gnatbind switch -kArnaud Charlet1-0/+16
This switch can be used to disable the effect of -F when using -n explicitly or implicitly. gcc/ada/ * bindgen.adb (Gen_Elab_Calls): Check for Check_Elaboration_Flags. * bindusg.adb (Display): Add -k. * opt.ads (Check_Elaboration_Flags): New. * switch-b.adb (Scan_Binder_Switches): Add processing of -k. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add documentation for -k and -K. * gnat_ugn.texi: Regenerate.
2022-09-05[Ada] Fix syntax in documentationArnaud Charlet1-5/+2
Leading to a poorly formatted example section. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Fix rest syntax * gnat_ugn.texi: Regenerate.
2022-09-02[Ada] Extend No_Dependence restriction to code generation (continued)Eric Botcazou1-1/+3
gcc/ada/ * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst (No_Dependence): Cite implicit dependences on the runtime library. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2022-09-02[Ada] Update documentation about non-symbolic tracebackEric Botcazou1-78/+99
This documents the limitation of addr2line with Position-Independent Code, introduces the replacement tool gnatsymbolize and adjusts obsolete stuff. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Non-Symbolic Traceback): Update section. * gnat_rm.texi, gnat_ugn.texi, gnat-style.texi: Regenerate.
2022-07-13[Ada] Clarify hardening command-line options that require explicit choicesAlexandre Oliva1-8/+9
Prefixes -fzero-call-used-regs and -fstrub could be mistaken for full command-line options with the references to them in the GNAT RM. Make it clearer that they require explicit choices. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Clarify the need for choices after -fzero-call-used-regs and -fstrub. * gnat_rm.texi: Regenerate.
2022-07-12[Ada] Make it clear that gnatmake passes the ball to gprbuild if -P is setVasiliy Fofanov1-9/+11
Also move -P switch description to the top of the switches list. gcc/ada/ * makeusg.adb, doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move -P to the top of switches list and make it clear that gnatmake passes the ball to gprbuild if -P is set. * gnat_ugn.texi: Regenerate.
2022-07-05[Ada] Warn about obsolete uses of renamed Ada 83 packagesPiotr Trojanek1-2/+1
Ada 83 packages like Unchecked_Conversion or Text_IO are obsolete since Ada 95. GNAT now warns about their uses when warnings on obsolescent featured (Annex J) is active. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Warning Message Control): Update description of switch -gnatwj. * gnat_ugn.texi: Regenerate. * sem_ch10.adb (Analyze_With_Clause): Warn on WITH clauses for obsolete renamed units; in Ada 83 mode do not consider predefined renamings to be obsolete. gcc/testsuite/ * gnat.dg/renaming1.adb: Update WITH clause. * gnat.dg/renaming1.ads: Likewise. * gnat.dg/warn29.adb: Likewise.
2022-07-04[Ada] Fix length of title underlines.Vasiliy Fofanov1-3/+3
gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Fix length of title underlines.
2022-07-04[Ada] Add a RM entry for the functional infinite sequencesJulien Bortolussi1-0/+22
Modify the RM to take into account the new functional container. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Add the new entry. * gnat_rm.texi: Regenerate.
2022-07-04[Ada] Update the documentation of functional containersClaire Dross1-21/+19
Functional containers are now controlled. Update the documentation accordingly. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Functional vectors, sets, and maps are now controlled. * gnat_rm.texi: Regenerate.
2022-07-04[Ada] Add GNAT specific pragmas to the equivalent Assertion_Policy for -gnataClaire Dross1-9/+25
All assertion pragmas are enabled by default when using -gnata. We need to add the GNAT specific ones to the list. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging and Assertion Control): Add GNAT specific assertion pragmas to the equivalent Assertion_Policy for the -gnata option. * gnat_ugn.texi: Regenerate.
2022-07-04[Ada] Adjust description of Pure_Function pragmaEric Botcazou1-3/+3
The current wording can be read as implying that the result of a call to a pure function does not depend on the context, which is incorrect. The pragma only guarantees the absence of side effects of such a call. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pure_Function): Fix ambiguous wording about context dependence. * gnat_rm.texi: Regenerate.
2022-06-01[Ada] Enable using absolute paths in -fdiagnostics-format=json outputGhjuvan Lacambre1-2/+4
This commit makes GNAT use absolute paths in -fdiagnostics-format=json's output when -gnatef is present on the command line. This makes life easier for tools that ingest GNAT's output. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document new behavior. * errout.adb (Write_JSON_Location): Output absolute paths when needed. * switch-c.adb (Scan_Front_End_Switches): Update -gnatef comment. * usage.adb (Usage): Update description of -gnatef. * gnat_ugn.texi: Regenerate.
2022-06-01[Ada] Note that hardening features are experimentalAlexandre Oliva1-0/+3
Some features haven't got customer feedback or made upstream yet. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Note that hardening features are experimental. * gnat_rm.texi: Regenerate.
2022-05-30[Ada] Remove repeated description of support for Address clausesPiotr Trojanek1-6/+0
The GNAT behaviour regarding the Ada RM requirement to support Address clauses for imported subprograms was documented twice: in section about packed types (which was a mistake) and in section about address clauses (where it belongs). Cleanup related to the use of packed arrays for bitset operations to detect uses of uninitialized scalars in GNAT. gcc/ada/ * doc/gnat_rm/implementation_advice.rst (Packed Types): Remove duplicated and wrongly placed paragraph. * gnat_rm.texi: Regenerate.
2022-05-30[Ada] Tweaks to hardening docsAlexandre Oliva1-13/+42
Mention when security hardening features are available in other languages. Expand the strub documentation a little, for clarity and completeness. Add missing 'aliased' and attribute to variables in strub example. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst: Mention availability in other languages when applicable. (Stack Scrubbing): Associate the attribute with types, expand some comments, fix the example involving access to variables. * gnat_rm.texi: Regenerate.
2022-05-19[Ada] Remove remaining references to gnatfind/gnatxrefArnaud Charlet2-8/+7
gcc/ada/ * gnat1drv.adb, gnatcmd.adb: Remove references to gnatfind/xref. * doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/the_gnat_compilation_model.rst: Ditto. * gnat_ugn.texi: Regenerate. * gnatfind.adb, gnatxref.adb, xr_tabls.adb, xr_tabls.ads, xref_lib.adb, xref_lib.ads: Removed, no longer used.
2022-05-18[Ada] Fast implementation of floating-point mathematical functionsEric Botcazou1-0/+18
This adds a package renaming unit to the GNAT hierarchy so as to expose the underlying implementation of floating-point mathematical functions, thus also making it possible to use their vector implementation, if any. The change also contains a small improvement to the Hide_Public_Entities mechanism in Sem_Ch7 that makes it possible to clear the Is_Public flag within instances of generic packages that do not have a body. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-gfmafu$(objext). (SIMD_PATH_TARGET_PAIRS): New variable. (TRASYM_DWARF_COMMON_OBJS): Minor tweak. (x86-64/Linux): Use SIMD_PATH_TARGET_PAIRS. (x32/Linux): Likewise. * doc/gnat_rm/the_gnat_library.rst (Generic_Fast_Math_Functions): New entry. * gnat_rm.texi: Regenerate. * impunit.adb (Non_Imp_File_Names_95): Add g-gfmafu. * sem_ch7.adb (Has_Referencer): Do not set In_Nested_Instance for instances of generic packages that do not have a body. * libgnat/a-nalofl__simd.ads: New SIMD-enabled version. * libgnat/a-nuaufl__simd.ads: Likewise. * libgnat/g-gfmafu.ads: New package renaming unit.
2022-05-17[Ada] Generic binary search implementationDmitriy Anisimkov1-0/+12
Allows binary search in sorted anonymous array (or array-like container). gcc/ada/ * libgnat/g-binsea.ads, libgnat/g-binsea.adb (GNAT.Binary_Search): New package. * Makefile.rtl (GNATRTL_NONTASKING_OBJS): New item in list. * doc/gnat_rm/the_gnat_library.rst (GNAT.Binary_Search): New package record. * gnat_rm.texi: Regenerate.
2022-05-17[Ada] Fix documentation of using attribute Loop_Entry in pragmasPiotr Trojanek1-4/+7
Attribute Loop_Entry was initially only allowed to appear in pragmas Loop_Variant and Loop_Invariant. Then it was also allowed to appear in pragmas Assert, Assert_And_Cut and Assume, but this change was not reflected in the GNAT RM. gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Loop_Entry): Mention pragmas Assert, Assert_And_Cut and Assume; refill. * gnat_rm.texi: Regenerate.
2022-05-13[Ada] Extend hardcfr testing (documentation)Alexandre Oliva1-16/+7
Having realized that noreturn calls of __builtin_return are special, and other noreturn calls don't get edges to the exit block, I've realized the consequences of the logic to insert checking before noreturn and tail calls were not quite what I'd expected before. Specifically, noreturn calls other than __builtin_return don't get any checking whatsoever. Moreover, optional tail calls are only detected long after hardcfr; the logic should work for must-tail calls, but there doesn't seem to be a way to test it. Documentation has been simplified so as to remove mention of these possibilities, that can't really be relied on. gcc/ada/ * doc/gnat_rm/security_hardening_features.rst (Control Flow Redundancy): Drop mentions of noreturn and tail calls. * gnat_rm.texi: Regenerate.
2022-05-13[Ada] Fix code example on representation clauseEtienne Servais1-3/+3
The column is superfluous, component names are missing. gcc/ada/ * doc/gnat_rm/representation_clauses_and_pragmas.rst: Fix code snippet. * gnat_rm.texi: Regenerate.