aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc/gnat_ugn
AgeCommit message (Collapse)AuthorFilesLines
2024-09-02ada: Create usage entry for -gnatw_lViljar Indus1-3/+3
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: update documentation for the -gnatw_l switch. * usage.adb: Add -gnatw_l entry. * gnat_ugn.texi: Regenerate.
2024-09-02ada: Fix minor issues in -gnaty0's documentationRonan Desplanques1-3/+3
Before this patch, the documentation of -gnaty0 used 0-based indexing for column numbers while 1-based indexing is used everywhere else. This patch makes this documentation use 1-based indexing, and also adds a missing parenthesis. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix minor issues. * gnat_ugn.texi: Regenerate.
2024-08-23ada: Emit a warning on inheritly limited typesViljar Indus1-0/+17
Record types that do not have a limited keyword but have a member with a limited type are also considered to be limited types. This can be confusing to understand for newer Ada users. It is better to emit a warning in this scenario and suggest that the type should be marked with a limited keyword. This diagnostic will be acticated when the -gnatw_l switch is used. gcc/ada/ * sem_ch3.adb: Add method Check_Inherited_Limted_Record for emitting the warning for an inherited limited type. * warnsw.adb: Add processing for the -gnatw_l switch that triggeres the inheritly limited type warning. * warnsw.ads: same as above. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add entry for -gnatw_l switch. * gnat_ugn.texi: Regenerate.
2024-06-20ada: New pragma to default all interrupts to system.Doug Rupp1-0/+4
New pragma Interrupts_System_By_Default defaults all interrupts/signals to system (which will inhibit the installation of default signal handlers). Note this changes the ALI format: it optionally adds an identifier to the 'P' line (similar to pragma Unreserve_All_Interrupts). As per comment in lib-writ spec regarding new modifiers, adding modifiers to the P line is always safe. Also note this does not introduce a bootstrap problem because the compiler and binder do not set the underlying _gl global nor do they use this pragma. gcc/ada/ * ali.ads (Interrupts_Default_To_System): New boolean. (Interrupts_Default_To_System_Specified): New boolean. * ali.adb (Interrupts_Default_To_System_Specified): Initialize. (Interrupts_Default_To_System): Initialize. (Scan_ALI): Processing for "ID". * bindgen.adb: Coallesce comments on interrupt settings to ... (Gen_Adainit): Import Interrupts_Default_To_System flag and set if pragma specified. (Gen_Output_File_Ada): Generate Local_Interrupt_States according to pragma. * init.c: ... here. [vxworks] (__gnat_install_handler): Test for interrupt_state. (__gl_interrupts_default_to_system): New global flag. (__gnat_get_interrupt_State): return interrupt state according to new global flag. * lib-writ.ads: Document "ID". * lib-writ.adb: Write out "ID". * opt.ads (Interrupts_System_By_Default): New boolean, defaulted to False. * par-prag.adb (Pragma_Interrupts_System_By_Default): New. * sem_prag.adb (Pragma_Interrupts_System_By_Default): Handle it. (Pragma_Interrupts_System_By_Default): Default it. * snames.ads-tmpl (Name_Interrupts_System_By_Default): New name. (Pragma_Interrupts_System_By_Default): New * libgnarl/s-intman__posix.adb (Initialize): Ensure the Keep_Unmasked signal is sigset-able. * doc/gnat_rm/implementation_defined_pragmas.rst: Document pragma Interrupts_System_By_Default. * doc/gnat_ugn/the_gnat_compilation_model.rst (Configuration pragmas): Add Interrupts_System_By_Default. (Partition-Wide Settings): Mention pragma Interrupts_System_By_Default. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2024-06-20ada: Change messages for -gnatw.v to warningsViljar Indus1-9/+8
Previously this switch was emitting only info messages which was both confusing in terms of the name of the switch that was used internally and externally. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update documentation for -gnatw.v. * sem_ch13.adb: Convert all -gnatw.v related messages to warnings. * gnat_ugn.texi: Regenerate.
2024-06-20ada: Convert -gnatw.n messages to warningsViljar Indus1-5/+7
Previously the messages produced by this warning switch were info messages that were suppressed with the same methods as regular warnings. Since info messages are now separated as a completely different class of messages then these messages should be converted back to warnings in order for the previous pragma based suppression methods to work. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update documentation for -gnatw.n switch. * exp_util.adb: Convert info messages into warnings. * gnat_ugn.texi: Regenerate.
2024-06-20ada: Add switch for suppressing info messagesViljar Indus1-0/+15
Add a separate switch -gnatis to suppress info messages separately from warning messages that are controlled by -gnatws. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add entry for -gnatis. * errout.adb (Error_Msg_Internal): Stop printing info messages if -gnatis was used. * opt.ads: Add Info_Suppressed flag to track whether info messages should be suppressed. * switch-c.adb: Add parsing for -gnatis. * gnat_ugn.texi: Regenerate.
2024-05-21ada: Update documentation of warning messagesViljar Indus1-7/+7
Update the documentation of warning messages that only emit info messages to clearly reflect that they only emit info messages and not warning messages. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the documentation of -gnatw.n and -gnatw.l * gnat_ugn.texi: Regenerate.
2024-05-21ada: Add new Mingw task priority mappingJustin Squirek1-51/+66
This patch adds a new mapping (Non_FIFO_Underlying_Priorities) for dynamically setting task priorities in Windows when pragma Task_Dispatching_Policy (FIFO_Within_Priorities) is not present. Additionally, it documents the requirement to specify the pragma in order to use Set_Priority in the general case. gcc/ada/ * doc/gnat_ugn/platform_specific_information.rst: Add note about different priority level granularities under different policies in Windows and move POSIX related info into new section. * libgnarl/s-taprop.ads: Add note about Task_Dispatching_Policy. * libgnarl/s-taprop__mingw.adb: (Set_Priority): Add use of Non_FIFO_Underlying_Priorities. * libgnat/system-mingw.ads: Add documentation for modifying priority mappings and add alternative mapping Non_FIFO_Underlying_Priorities. * gnat_ugn.texi: Regenerate.
2024-05-20ada: Rework and augment documentation on strict aliasingEric Botcazou1-128/+168
The documentation was originally centered around pragma No_Strict_Aliasing and pragma Universal_Aliasing was mentioned only as an afterthought. It also contained a warning about the usage of overlays implemented by means of address clauses that has been obsolete for long. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Universal_Aliasing): Remove reference to No_Strict_Aliasing. * doc/gnat_ugn/gnat_and_program_execution.rst (Optimization and Strict Aliasinng): Simplify first example and make it more consistent with the second. Add description of the effects of pragma Universal_Aliasing and document new warning issued for unchecked conversions. Remove obsolete stuff. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2023-11-21ada: Fix misplaced index directive in documentationMarc Poulhiès1-6/+5
The index directive must be located before the indexed element, at least for the generated texinfo to be correct. See: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-index This was reported along with changes done in https://inbox.sourceware.org/gcc-patches/20230223102714.3606058-3-arsen@aarsen.me/ gcc/ada/ * doc/gnat_ugn/the_gnat_compilation_model.rst: Move index directives. * gnat_ugn.texi: Regenerate.
2023-11-07ada: Fix documentation of -gnatwcRonan Desplanques1-2/+2
-gnatwc has been correctly emitting warnings for expressions outside of tests for a while, but its documentation in the user's guide had never been updated to reflect that. Also, the documentation used "conditional expressions" to designate boolean expressions, but "conditional expressions" has been defined by Ada 2012 to designate if expressions and case expressions. This patch fixes those issues. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix -gnatwc documentation. * gnat_ugn.texi: Regenerate.
2023-11-07ada: New Local_Restrictions and User_Aspect aspects.Steve Baird1-0/+1
A GNAT-defined aspect, Local_Restrictions, is defined. This provides a way of enforcing a given restriction for an individual subprogram (and its call-closure) without requiring that the entire program satisfy the restriction. A GNAT-defined aspect, User_Aspect, is defined. This (along with the new User_Aspect_Definition configuration pragma) provides a way of naming a set of aspect specifications which can then be applied to multiple declarations without textual repetition of the set. gcc/ada/ * local_restrict.ads: A new package. Declares Local_Restriction enumeration type and provides operations to check for local restriction violations. * local_restrict.adb: Corresponding package body. Replace "not Present (X)" calls with "No (X)" calls. * aspects.ads: Add a new enumeration elements, Aspect_Local_Restrictions and Aspect_User_Aspect, to the Aspect_Id enumeration type. Update Aspect_Id-indexed aggregates. Add nested package User_Aspect_Support to manage two pieces of state. One is a map from identifiers to User_Aspect_Definition pragmas (updated when such a pragma is encountered). The other is an access-to-subprogram variable that is introduced in order to keep the bulk of semantics out of the closure of package Aspects while allowing a call from aspects.adb to the sem_ch13 procedure that analyzes a User_Aspect aspect specification. * aspects.adb (Find_Aspect): Cope with a case of a block statement with an empty parent. It is not clear whether this is papering over a compiler bug. Add indirect call through the aforementioned access-to-subprogram variable when Find_Aspect enounters an unanalyzed User_Aspect aspect specification. If Find_Aspect is called looking for aspect Foo, then a User_Aspect specification might generate (during analysis) a Foo aspect specification. So the Find_Aspect call needs to trigger that analysis if it has not already taken place. Provide a body for package User_Aspect_Support. Replace "not Present (X)" call with "No (X)" call. * freeze.adb (Freeze_Subprogram): Check local restriction compatibility when a dispatching operation is overridden. * par-prag.adb: Add support for parsing a User_Aspect_Definition pragma. * restrict.ads: We'd like to have the body of package Restrict include a call to a procedure declared in package Local_Restrict. Doing that in the obvious way pulls most of semantics into the closure of package Restrict, and that turns out to cause problems. So we introduce a level of indirection and instead call through an access-to-subprogram value. In this unit, we declare the access-to-subprogram type and object. * restrict.adb (Check Restriction): When a construct is encountered that could violate a global restriction (depending on whether the given restriction is in effect), Check_Restriction is called. At this point, we also check for a violation of any corresponding local restriction that is in effect. For reasons described above, this check is performed via an indirect call. * sem_ch13.ads (Parse_Aspect_Local_Restrictions): A new function, similar to the existing Parse_Aspect_Xxx subprograms. * sem_ch13.adb: Perform semantic analysis of Local_Restrictions and User_Aspect aspect specifications. Declare and call new Validate_Aspect_Local_Restrictions and Analyze_User_Aspect_Aspect_Specification procedures (a reference to the latter is registered during package elaboration). In Analyze_Aspect_Specifications, do not set the Analyzed flag of a User_Aspect aspect specification. Replace "not Present (X)" call with "No (X)" call. Replace 'Image with 'Img in a case where the prefix of the attribute reference is an object; this is done to accomodate older compilers. * sem_ch6.adb (Check_Subtype_Conformant): Include in subtype conformance check a check for overriding-related compatibility of local restrictions. * sem_ch8.adb (Analyze_Subprogram_Renaming): In the case of an instance of a generic that takes a formal subprogram, check that formal and actual are compatible with respect to local restrictions. * sem_prag.adb: Add support for User_Aspect_Definition pragma. * sem_res.adb (Resolve_Call): Check caller/callee compatibility with respect to local restrictions. * snames.ads-tmpl: Add Name_Local_Restrictions, Name_User_Aspect, and Name_User_Aspect_Definition constants. * doc/gnat_rm/implementation_defined_aspects.rst: Document new aspects. * doc/gnat_rm/implementation_defined_pragmas.rst: Document new pragma. * doc/gnat_ugn/the_gnat_compilation_model.rst: Add User_Aspect_Definition to list of GNAT pragmas. * gcc-interface/Make-lang.in: Add local_restrict.o. * gnat-style.texi: Regenerate. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2023-10-19ada: Document gnatbind -Q switchPatrick Bernardi1-6/+23
Add documentation for the -Q gnatbind switch in GNAT User's Guide and improve gnatbind's help output for the switch to emphasize that it adds the requested number of stacks to the secondary stack pool generated by the binder. gcc/ada/ * bindusg.adb (Display): Make it clear -Q adds to the number of secondary stacks generated by the binder. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document the -Q gnatbind switch and fix references to old runtimes. * gnat-style.texi: Regenerate. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2023-09-26ada: Dimensional analysis when used with elementary functionsDerek Schacht1-0/+12
gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Add more details on using Generic Elementary Functions with dimensional analysis. * gnat_ugn.texi: Regenerate.
2023-09-15ada: Remove GNAT Pro details regarding moldKévin Le Gouguec1-22/+0
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Remove extended discussion regarding mold run-time dependencies; packaging changes in GNAT Pro have made them obsolete.
2023-09-05ada: building_executable_programs_with_gnat.rst: fix -gnatw.x indexGhjuvan Lacambre1-1/+1
The index for this paragraph was wrong. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix index. * gnat_ugn.texi: Regenerate.
2023-07-06ada: Refer to non-Ada binding limitations in user guideViljar Indus1-0/+3
The limitation of resetting the FPU mode for non 80-bit precision was not referenced from "Creating a Stand-alone Library to be used in a non-Ada context". Reference it the same way it is already referenced from "Interfacing to C". gcc/ada/ * doc/gnat_ugn/the_gnat_compilation_model.rst: Reference "Binding with Non-Ada Main Programs" from "Creating a Stand-alone Library to be used in a non-Ada context". * gnat_ugn.texi: Regenerate.
2023-06-20ada: Fix couple of issues in documentation of overflow checkingEric Botcazou1-20/+3
There is still a mention of the defunct CHECKED mode and the Default Settings paragraph is confusing with regard to the -gnato switch. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Overflows in GNAT) <Default Settings>: Remove obsolete paragraph about -gnato. <Implementation Notes>: Replace CHECKED with STRICT. * gnat_ugn.texi: Regenerate.
2023-06-20ada: Document partition-wide Ada signal handlersJose Ruiz1-0/+47
Indicate the signal handlers that are set by the Ada run time, and explain how to prevent them if needed. gcc/ada/ * doc/gnat_ugn/the_gnat_compilation_model.rst (Partition-Wide Settings): add this subsection to document configuration settings made by the Ada run time. * gnat_ugn.texi: Regenerate.
2023-06-20ada: Introduce -gnateH switch to force reverse Bit_Order threshold to 64Eric Botcazou1-0/+8
This can be helpful for legacy code that still makes use of an original reverse Bit_Order clause, i.e. without a Scalar_Storage_Order clause. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Compiler Switches): Document -gnateH. * opt.ads (Reverse_Bit_Order_Threshold): New variable. * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Use its value if it is nonnegative instead of System_Max_Integer_Size. * switch-c.adb (Scan_Front_End_Switches): Deal with -gnateH. * usage.adb (Usage): Print -gnateH. * gnat_ugn.texi: Regenerate.
2023-06-15ada: Make minor improvements to user's guideRonan Desplanques2-16/+16
gcc/ada/ * doc/gnat_ugn/about_this_guide.rst: Fix typo. Uniformize punctuation. * doc/gnat_ugn/the_gnat_compilation_model.rst: Uniformize punctuation. Fix capitalization. Fix indentation of code block. Fix RST formatting syntax errors. * gnat_ugn.texi: Regenerate.
2023-05-30ada: Fix minor issues in user's guideRonan Desplanques2-18/+16
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix minor issues. * doc/gnat_ugn/the_gnat_compilation_model.rst: Fix minor issues. * gnat_ugn.texi: Regenerate.
2023-05-29ada: Remove extra whitespace from FOR loopsPiotr Trojanek1-2/+2
Whitespace cleanup. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Some Useful Memory Pools): Remove extra whitespace from examples. * sem_aggr.adb (Make_String_Into_Aggregate): Remove extra whitespace. * gnat_ugn.texi: Regenerate.
2023-05-23ada: Add new switch -gnatyzArnaud Charlet1-7/+16
Improve -gnatyx to check additional complete conditions, and introduce a new switch -gnatyz to check for unnecessary parentheses according to operator precedence rules. Enable -gnatyz as part of -gnatyg. gcc/ada/ * par-ch5.adb, style.ads, styleg.adb, styleg.ads (Check_Xtra_Parens): Remove extra parameter Enable. (Check_Xtra_Parens_Precedence): New. (P_Case_Statement): Add -gnatyx style check. * sem_ch4.adb: Replace calls to Check_Xtra_Parens by Check_Xtra_Parens_Precedence. * stylesw.ads, stylesw.adb, usage.adb: Add support for -gnatyz. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update -gnatyxzg doc. * sem_prag.adb, libgnat/s-regpat.adb, libgnarl/s-interr__hwint.adb, libgnarl/s-interr__vxworks.adb: Remove extra parens. * par-ch3.adb (P_Discrete_Range): Do not emit a style check if the expression is not a simple expression. * gnat_ugn.texi: Regenerate.
2023-05-16ada: Fix typo in "pattern"Tom Tromey1-1/+1
I found a couple of spots using the typo "patterm" rather than the correct "pattern". gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Switches_for_gnatbind): Fix typo. * libgnat/g-spipat.ads: Fix typo. * gnat_ugn.texi: Regenerate.
2023-05-15ada: Fix formatting inconsistency in User's GuideRonan Desplanques1-2/+2
gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Fix formatting inconsistency.
2023-05-15ada: Emit warnings for (some) ineffective static predicate testsSteve Baird1-0/+21
Generate a warning if a static predicate tests for a value that does not belong to the parent subtype. For example, in subtype S is Positive with Static_Predicate => S not in 0 | 11 | 222; the 0 is ineffective because Positive already excludes that value. Generation of this new warning is controlled by the -gnatw_s switch, which can also be enabled via -gnatwa. gcc/ada/ * warnsw.ads: Add a new element, Warn_On_Ineffective_Predicate_Test, to the Opt_Warnings_Enum enumeration type. * warnsw.adb: Bind "-gnatw_s" to the new Warn_On_Ineffective_Predicate_Test switch. Add the new switch to the set of switches enabled by -gnata . * sem_ch13.adb (Build_Discrete_Static_Predicate): Declare new local procedure, Warn_If_Test_Ineffective, which conditionally generates new warning. Call this new procedure when building a new element of an RList. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Document the -gnatw_s switch (and the corresponding -gnatw_S switch). * gnat_ugn.texi: Regenerate.
2023-05-15ada: GNAT UGN: Add section documenting PIE being enabled by default on LinuxJoel Brobecker1-0/+42
This commit updates the Linux-specific chapter to add a new section documenting the fact that PIE is enabled by default, and provides some information about the impact that this might have on some projects, as well as recommendations on how to handle issues. gcc/ada/ * doc/gnat_ugn/platform_specific_information.rst (_PIE_Enabled_By_Default_On_Linux): New section. * gnat-style.texi: Regenerate. * gnat_ugn.texi: Regenerate.
2023-01-05ada: Update gnatpp documentation with --layout switchJoao Azevedo1-506/+325
Update legacy switches. gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: add gnatpp --layout switch and update legacy switches.
2023-01-05ada: Update doc for -gnatw_qBob Duff1-0/+2
The -gnatw_q switch turns on warnings for noncomposing "=" operators. This patch updates the doc to refer to relevant RM paragraphs. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add RM references. * gnat_ugn.texi: Regenerate.
2023-01-03ada: GNAT UGN: Adjust wording in "Platform-specific Information" chapterJoel Brobecker1-2/+2
The wording of the introduction paragraph specified an incomplete list of OSes. Rather than trying to update the list, this commit changes the text to make it more general. For those parts of this chapter which only apply to specific OSes, the documentation is written in a way that it is clear which OS it applies to. gcc/ada/ * doc/gnat_ugn/platform_specific_information.rst (_Platform_Specific_Information): Minor rewording of intro text. * gnat_ugn.texi: Regenerate.
2022-12-01ada: Further adjustments to User's Guide for PIE defaultEric Botcazou2-13/+18
gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Non-Symbolic Traceback): Add compilation line. (Symbolic Traceback): Remove obsolete stuff. * doc/gnat_ugn/gnat_utility_programs.rst (gnatsymbolize): Adjust. * gnat_ugn.texi: Regenerate.
2022-11-28ada: Adjust runtime library and User's Guide to PIE default on LinuxEric Botcazou2-31/+45
gcc/ada/ * libgnat/g-traceb.ads: Minor tweaks in the commentary. (Executable_Load_Address): New function. * doc/gnat_ugn/gnat_and_program_execution.rst (Non-Symbolic Traceback): Adjust to PIE default on Linux. (Symbolic Traceback): Likewise. * doc/gnat_ugn/gnat_utility_programs.rst (gnatsymbolize): Likewise. * gnat_ugn.texi: Regenerate.
2022-11-21ada: Improve documentation for -gnatw.h warningsSteve Baird1-2/+7
The -gnatw.h option enables warnings about "gaps" in record layout specifications. In the case of a "partial" layout specification, where the locations of some components are left unspecified, the resulting warnings may be incomplete or incorrect. Document this implementation limitation. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Improve the description of how the -gnatw.h switch interacts with "partial" record layout specifications (i.e., specifications where the locations of some components are left unspecified). * gnat_ugn.texi: Regenerate.
2022-11-14ada: Remove gnatcheck referenceArnaud Charlet1-22/+0
Since gnatcheck is no longer bundled with gnat gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Remove gnatcheck reference.
2022-11-14Revert "sphinx: ada: port to Sphinx"Martin Liska4-90/+6
This reverts commit 0a543515957ff47feba739e6f71062fb2fb99125.
2022-11-09sphinx: ada: port to SphinxMartin Liska4-6/+90
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: 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: Allow enabling a restricted set of language extensions.Steve Baird1-3/+20
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-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-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-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] 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.