diff options
author | Martin Liska <mliska@suse.cz> | 2022-09-26 21:05:44 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-09-26 21:05:44 +0200 |
commit | 3c527a35fa428b727807c81f1225a5e0025446c1 (patch) | |
tree | 787e21d7bf8a1d85ac7b9ccee784909e85ebf61b /gcc/ada | |
parent | c9c59aa19c0b7159636763294b7b0c87c696d675 (diff) | |
parent | 7701ea4a70a5a5c0fd977da90a30ffc4f3f87617 (diff) | |
download | gcc-3c527a35fa428b727807c81f1225a5e0025446c1.zip gcc-3c527a35fa428b727807c81f1225a5e0025446c1.tar.gz gcc-3c527a35fa428b727807c81f1225a5e0025446c1.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 13 | ||||
-rw-r--r-- | gcc/ada/bindgen.adb | 9 | ||||
-rw-r--r-- | gcc/ada/cal.c | 2 | ||||
-rw-r--r-- | gcc/ada/contracts.adb | 2 | ||||
-rw-r--r-- | gcc/ada/cstreams.c | 8 | ||||
-rw-r--r-- | gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst | 8 | ||||
-rw-r--r-- | gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst | 30 | ||||
-rw-r--r-- | gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst | 1120 | ||||
-rw-r--r-- | gcc/ada/expect.c | 8 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 22 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 12 | ||||
-rw-r--r-- | gcc/ada/gsocket.h | 6 | ||||
-rw-r--r-- | gcc/ada/mingw32.h | 28 | ||||
-rw-r--r-- | gcc/ada/rtsfind.ads | 111 | ||||
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 3 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 7 | ||||
-rw-r--r-- | gcc/ada/sem_ch5.adb | 8 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 24 | ||||
-rw-r--r-- | gcc/ada/sem_warn.ads | 9 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 6 |
21 files changed, 105 insertions, 1349 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a1c4375..c48bbdf 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2022-09-20 Martin Liska <mliska@suse.cz> + + * exp_ch6.adb: Replace "the the" with "the". + * sem_ch6.adb: Likewise. + * sem_disp.ads: Likewise. + 2022-09-15 Richard Biener <rguenther@suse.de> * gcc-interface/trans.cc (gigi): Do not initialize void_list_node. @@ -60,7 +66,7 @@ 2022-09-12 Eric Botcazou <ebotcazou@adacore.com> - * contracts.adb (uild_Subprogram_Contract_Wrapper): Remove useless + * contracts.adb (Build_Subprogram_Contract_Wrapper): Remove useless local variable. In the case of a function, replace the extended return statement by a block statement declaring a renaming of the call to the local subprogram after removing side effects manually. @@ -1173,14 +1179,14 @@ 2022-09-02 Eric Botcazou <ebotcazou@adacore.com> - * exp_util.adb (Expand_Subtype_From_Expr): Be prepared for - rewritten aggregates as expressions. + * exp_util.adb (Expand_Subtype_From_Expr): Be prepared for rewritten + aggregates as expressions. 2022-09-02 Gary Dismukes <dismukes@adacore.com> - * exp_ch6.adb (Expand_Simple_Function_Return) Bypass creation of an actual - subtype and unchecked conversion to that subtype when the underlying type - of the expression has discriminants without defaults. + * exp_ch6.adb (Expand_Simple_Function_Return) Bypass creation of an + actual subtype and unchecked conversion to that subtype when the + underlying type of the expression has discriminants without defaults. 2022-09-02 Eric Botcazou <ebotcazou@adacore.com> diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 2ae4ded..199dbe0 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -200,11 +200,7 @@ UINT __gnat_current_ccs_encoding; #endif /* wait.h processing */ -#ifdef __MINGW32__ -# if OLD_MINGW -# include <sys/wait.h> -# endif -#elif defined (__vxworks) && defined (__RTP__) +#if defined (__vxworks) && defined (__RTP__) # include <wait.h> #elif defined (__Lynx__) /* ??? We really need wait.h and it includes resource.h on Lynx. GCC @@ -214,7 +210,7 @@ UINT __gnat_current_ccs_encoding; preventing the inclusion of the GCC header from doing anything. */ # define GCC_RESOURCE_H # include <sys/wait.h> -#elif defined (__PikeOS__) +#elif defined (__PikeOS__) || defined (__MINGW32__) /* No wait() or waitpid() calls available. */ #else /* Default case. */ @@ -335,11 +331,6 @@ const char *__gnat_library_template = GNAT_LIBRARY_TEMPLATE; #if defined (__MINGW32__) #include "mingw32.h" - -#if OLD_MINGW -#include <sys/param.h> -#endif - #else #include <sys/param.h> #endif diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index b2fa44d..f2aaa2d 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -134,9 +134,6 @@ package body Bindgen is -- Text for aspect specifications (if any) given as part of the -- Adainit and Adafinal spec declarations. - function Aspect_Text return String is - (if Enable_CUDA_Device_Expansion then " with CUDA_Global" else ""); - ---------------------------------- -- Interface_State Pragma Table -- ---------------------------------- @@ -2644,10 +2641,11 @@ package body Bindgen is end if; WBI (""); - WBI (" procedure " & Ada_Init_Name.all & Aspect_Text & ";"); + WBI (" procedure " & Ada_Init_Name.all & ";"); if Enable_CUDA_Device_Expansion then WBI (" pragma Export (C, " & Ada_Init_Name.all & ", Link_Name => """ & Device_Ada_Init_Link_Name & """);"); + WBI (" pragma CUDA_Global (" & Ada_Init_Name.all & ");"); else WBI (" pragma Export (C, " & Ada_Init_Name.all & ", """ & Ada_Init_Name.all & """);"); @@ -2662,11 +2660,12 @@ package body Bindgen is if not Cumulative_Restrictions.Set (No_Finalization) then WBI (""); - WBI (" procedure " & Ada_Final_Name.all & Aspect_Text & ";"); + WBI (" procedure " & Ada_Final_Name.all & ";"); if Enable_CUDA_Device_Expansion then WBI (" pragma Export (C, " & Ada_Final_Name.all & ", Link_Name => """ & Device_Ada_Final_Link_Name & """);"); + WBI (" pragma CUDA_Global (" & Ada_Final_Name.all & ");"); else WBI (" pragma Export (C, " & Ada_Final_Name.all & ", """ & Ada_Final_Name.all & """);"); diff --git a/gcc/ada/cal.c b/gcc/ada/cal.c index e1ab692..09bcc15 100644 --- a/gcc/ada/cal.c +++ b/gcc/ada/cal.c @@ -53,10 +53,8 @@ #ifdef __MINGW32__ #include "mingw32.h" -#if STD_MINGW #include <winsock.h> #endif -#endif void __gnat_timeval_to_duration (struct timeval *t, long long *sec, long *usec) diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index 34db67a..dd573d3 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -1207,7 +1207,7 @@ package body Contracts is -- A Ghost object cannot be effectively volatile (SPARK RM 6.9(7) and -- SPARK RM 6.9(19)). - elsif Is_Effectively_Volatile (Obj_Id) then + elsif SPARK_Mode = On and then Is_Effectively_Volatile (Obj_Id) then Error_Msg_N ("ghost object & cannot be volatile", Obj_Id); -- A Ghost object cannot be imported or exported (SPARK RM 6.9(7)). diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 10cc3a6..fc583e1 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -97,14 +97,6 @@ extern "C" { #undef fileno #endif -/* The _IONBF value in MINGW32 stdio.h is wrong. */ -#if defined (WINNT) || defined (_WINNT) -#if OLD_MINGW -#undef _IONBF -#define _IONBF 0004 -#endif -#endif - int __gnat_feof (FILE *stream) { diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index c25e3d4..d839b1f 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -1623,13 +1623,13 @@ Multi-dimensional arrays can be modified, as shown by this example: which changes element (1,2) to 20 and (3,4) to 30. -Attribute Valid_Image +Attribute Valid_Value ======================= -.. index:: Valid_Image +.. index:: Valid_Value -The ``'Valid_Image`` attribute is defined for enumeration types other than +The ``'Valid_Value`` attribute is defined for enumeration types other than those in package Standard. This attribute is a function that takes -a String, and returns Boolean. ``T'Valid_Image (S)`` returns True +a String, and returns Boolean. ``T'Valid_Value (S)`` returns True if and only if ``T'Value (S)`` would not raise Constraint_Error. Attribute Valid_Scalars diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 6a47809..d4bddff 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -1719,6 +1719,7 @@ Alphabetical List of All Switches Float_Words_BE : Nat; -- Float words stored big-endian? Int_Size : Pos; -- Standard.Integer'Size Long_Double_Size : Pos; -- Standard.Long_Long_Float'Size + Long_Long_Long_Size : Pos; -- Standard.Long_Long_Long_Integer'Size Long_Long_Size : Pos; -- Standard.Long_Long_Integer'Size Long_Size : Pos; -- Standard.Long_Integer'Size Maximum_Alignment : Pos; -- Maximum permitted alignment @@ -1816,6 +1817,7 @@ Alphabetical List of All Switches Float_Words_BE 0 Int_Size 64 Long_Double_Size 128 + Long_Long_Long_Size 128 Long_Long_Size 64 Long_Size 64 Maximum_Alignment 16 @@ -6229,11 +6231,33 @@ Linker switches can be specified after :switch:`-largs` builder switch. .. index:: -fuse-ld=name :switch:`-fuse-ld={name}` - Linker to be used. The default is ``bfd`` for :file:`ld.bfd`, - the alternative being ``gold`` for :file:`ld.gold`. The later is - a more recent and faster linker, but only available on GNU/Linux + Linker to be used. The default is ``bfd`` for :file:`ld.bfd`; ``gold`` + (for :file:`ld.gold`) and ``mold`` (for :file:`ld.mold`) are more + recent and faster alternatives, but only available on GNU/Linux platforms. + .. only:: PRO + + The GNAT distribution for native Linux platforms includes ``mold``, + compiled against OpenSSL version 1.1; however, the distribution does + not include OpenSSL. In order to use this linker, you may either: + + * use your system's OpenSSL library, if the version matches: in this + situation, you need not do anything beside using the + :switch:`-fuse-ld=mold` switch, + + * obtain a source distribution for OpenSSL 1.1, compile the + :file:`libcrypto.so` library and install it in the directory of + your choice, then include this directory in the + :envvar:`LD_LIBRARY_PATH` environment variable, + + * install another copy of ``mold`` by other means in the directory + of your choice, and include this directory in the :envvar:`PATH` + environment variable; you may find this alternative preferable if + the copy of ``mold`` included in GNAT does not suit your needs + (e.g. being able to link against your system's OpenSSL, or using + another version of ``mold``). + .. _Binding_with_gnatbind: Binding with ``gnatbind`` diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst index d670839..92877a2 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst @@ -15,7 +15,6 @@ This chapter describes a number of utility programs: * :ref:`The_File_Cleanup_Utility_gnatclean` * :ref:`The_GNAT_Library_Browser_gnatls` * :ref:`The_Coding_Standard_Verifier_gnatcheck` - * :ref:`The_GNAT_Metrics_Tool_gnatmetric` * :ref:`The_GNAT_Pretty_Printer_gnatpp` * :ref:`The_Body_Stub_Generator_gnatstub` * :ref:`The_Backtrace_Symbolizer_gnatsymbolize` @@ -487,1123 +486,6 @@ building specialized scripts. For full details, plese refer to :title:`GNATcheck Reference Manual`. - -.. only:: PRO or GPL - - .. _The_GNAT_Metrics_Tool_gnatmetric: - - The GNAT Metrics Tool ``gnatmetric`` - ==================================== - - .. index:: ! gnatmetric - .. index:: Metric tool - - The ``gnatmetric`` tool is a utility - for computing various program metrics. - It takes an Ada source file as input and generates a file containing the - metrics data as output. Various switches control which - metrics are reported. - - ``gnatmetric`` is a project-aware tool - (see :ref:`Using_Project_Files_with_GNAT_Tools` for a description of - the project-related switches). The project file package that can specify - ``gnatmetric`` switches is named ``Metrics``. - - The ``gnatmetric`` command has the form - - :: - - $ gnatmetric [ switches ] { filename } - - where: - - * ``switches`` specify the metrics to compute and define the destination for - the output - - * Each ``filename`` is the name of a source file to process. 'Wildcards' are - allowed, and the file name may contain path information. If no - ``filename`` is supplied, then the ``switches`` list must contain at least - one :switch:`--files` switch (see :ref:`Other_gnatmetric_Switches`). - Including both a :switch:`--files` switch and one or more ``filename`` - arguments is permitted. - - Note that it is no longer necessary to specify the Ada language version; - ``gnatmetric`` can process Ada source code written in any version from - Ada 83 onward without specifying any language version switch. - - The following subsections describe the various switches accepted by - ``gnatmetric``, organized by category. - - .. _Output_File_Control-gnatmetric: - - Output File Control - ------------------- - - .. index:: Output file control in gnatmetric - - ``gnatmetric`` has two output formats. It can generate a - textual (human-readable) form, and also XML. By default only textual - output is generated. - - When generating the output in textual form, ``gnatmetric`` creates - for each Ada source file a corresponding text file - containing the computed metrics, except for the case when the set of metrics - specified by gnatmetric parameters consists only of metrics that are computed - for the whole set of analyzed sources, but not for each Ada source. - By default, the name of the file containing metric information for a source - is obtained by appending the :file:`.metrix` suffix to the - name of the input source file. If not otherwise specified and no project file - is specified as ``gnatmetric`` option this file is placed in the same - directory as where the source file is located. If ``gnatmetric`` has a - project file as its parameter, it places all the generated files in the - object directory of the project (or in the project source directory if the - project does not define an object directory). If :switch:`--subdirs` option - is specified, the files are placed in the subrirectory of this directory - specified by this option. - - All the output information generated in XML format is placed in a single - file. By default the name of this file is :file:`metrix.xml`. - If not otherwise specified and if no project file is specified - as ``gnatmetric`` option this file is placed in the - current directory. - - Some of the computed metrics are summed over the units passed to - ``gnatmetric``; for example, the total number of lines of code. - By default this information is sent to :file:`stdout`, but a file - can be specified with the :switch:`--global-file-name` switch. - - The following switches control the ``gnatmetric`` output: - - .. index:: --generate-xml-output (gnatmetric) - - :switch:`--generate-xml-output` - Generate XML output. - - .. index:: --generate-xml-schema (gnatmetric) - - :switch:`--generate-xml-schema` - Generate XML output and an XML schema file that describes the structure - of the XML metric report. This schema is assigned to the XML file. The schema - file has the same name as the XML output file with :file:`.xml` suffix replaced - with :file:`.xsd`. - - .. index:: --no-text-output (gnatmetric) - - - :switch:`--no-text-output` - Do not generate the output in text form (implies :switch:`-x`). - - .. index:: --output-dir (gnatmetric) - - - :switch:`--output-dir={output_dir}` - Put text files with detailed metrics into ``output_dir``. - - .. index:: --output-suffix (gnatmetric) - - - :switch:`--output-suffix={file_suffix}` - Use ``file_suffix``, instead of :file:`.metrix` - in the name of the output file. - - .. index:: --global-file-name (gnatmetric) - - :switch:`--global-file-name={file_name}` - Put global metrics into ``file_name``. - - .. index:: --xml-file-name (gnatmetric) - - - :switch:`--xml-file-name={file_name}` - Put the XML output into ``file_name`` - (also implies :switch:`--generate-xml-output`). - - .. index:: --short-file-names (gnatmetric) - - :switch:`--short-file-names` - Use 'short' source file names in the output. (The ``gnatmetric`` - output includes the name(s) of the Ada source file(s) from which the - metrics are computed. By default each name includes the absolute - path. The :switch:`--short-file-names` switch causes ``gnatmetric`` - to exclude all directory information from the file names that are - output.) - - .. index:: --wide-character-encoding (gnatmetric) - - :switch:`--wide-character-encoding={e}` - Specify the wide character encoding method for the input and output - files. ``e`` is one of the following: - - * *8* - UTF-8 encoding - - * *b* - Brackets encoding (default value) - - - .. index:: Disable Metrics For Local Units in gnatmetric - - .. _Disable_Metrics_For_Local_Units: - - Disable Metrics For Local Units - ------------------------------- - - ``gnatmetric`` relies on the GNAT compilation model -- - one compilation - unit per one source file. It computes line metrics for the whole source - file, and it also computes syntax - and complexity metrics for the file's outermost unit. - - By default, ``gnatmetric`` will also compute all metrics for certain - kinds of locally declared program units: - - * subprogram (and generic subprogram) bodies; - - * package (and generic package) specs and bodies; - - * task object and type specifications and bodies; - - * protected object and type specifications and bodies. - - .. index:: Eligible local unit (for gnatmetric) - - These kinds of entities will be referred to as - *eligible local program units*, or simply *eligible local units*, - in the discussion below. - - Note that a subprogram declaration, generic instantiation, - or renaming declaration only receives metrics - computation when it appear as the outermost entity - in a source file. - - Suppression of metrics computation for eligible local units can be - obtained via the following switch: - - - .. index:: --no-local-metrics (gnatmetric) - - - :switch:`--no-local-metrics` - Do not compute detailed metrics for eligible local program units. - - - .. _Specifying_a_set_of_metrics_to_compute: - - Specifying a set of metrics to compute - -------------------------------------- - - By default all the metrics are reported. The switches described in this - subsection allow you to control, on an individual basis, whether metrics are - reported. If at least one positive metric switch is specified (that is, a - switch that defines that a given metric or set of metrics is to be computed), - then only explicitly specified metrics are reported. - - .. _Line_Metrics_Control: - - Line Metrics Control - ^^^^^^^^^^^^^^^^^^^^ - - .. index:: Line metrics control in gnatmetric - - For each source file, and for each of its eligible local program - units, ``gnatmetric`` computes the following metrics: - - * the total number of lines; - - * the total number of code lines (i.e., non-blank lines that are not - comments) - - * the number of comment lines - - * the number of code lines containing end-of-line comments; - - * the comment percentage: the ratio between the number of lines that - contain comments and the number of all non-blank lines, expressed as - a percentage - - * the number of empty lines and lines containing only space characters - and/or format effectors (blank lines) - - * the average number of code lines in subprogram bodies, task bodies, - entry bodies and statement sequences in package bodies - - ``gnatmetric`` sums the values of the line metrics for all the files - being processed and then generates the cumulative results. The tool - also computes for all the files being processed the average number of - code lines in bodies. - - You can use the following switches to select the specific line metrics - to be reported. - - - .. index:: --lines (gnatmetric) - .. index:: --no-lines (gnatmetric) - - - :switch:`--lines-all` - Report all the line metrics - - - :switch:`--no-lines-all` - Do not report any of line metrics - - - :switch:`--lines` - Report the number of all lines - - - :switch:`--no-lines` - Do not report the number of all lines - - - :switch:`--lines-code` - Report the number of code lines - - - :switch:`--no-lines-code` - Do not report the number of code lines - - - :switch:`--lines-comment` - Report the number of comment lines - - - :switch:`--no-lines-comment` - Do not report the number of comment lines - - - :switch:`--lines-eol-comment` - Report the number of code lines containing - end-of-line comments - - - :switch:`--no-lines-eol-comment` - Do not report the number of code lines containing - end-of-line comments - - - :switch:`--lines-ratio` - Report the comment percentage in the program text - - - :switch:`--no-lines-ratio` - Do not report the comment percentage in the program text - - - :switch:`--lines-blank` - Report the number of blank lines - - - :switch:`--no-lines-blank` - Do not report the number of blank lines - - - :switch:`--lines-average` - Report the average number of code lines in subprogram bodies, task bodies, - entry bodies and statement sequences in package bodies. - - - :switch:`--no-lines-average` - Do not report the average number of code lines in subprogram bodies, - task bodies, entry bodies and statement sequences in package bodies. - - - :switch:`--lines-spark` - Report the number of lines written in SPARK. - - - :switch:`--no-lines-spark` - Do not report the number of lines written in SPARK. - - - .. _Syntax_Metrics_Control: - - Syntax Metrics Control - ^^^^^^^^^^^^^^^^^^^^^^ - - .. index:: Syntax metrics control in gnatmetric - - ``gnatmetric`` computes various syntactic metrics for the - outermost unit and for each eligible local unit: - - * *LSLOC ('Logical Source Lines Of Code')* - The total number of declarations and the total number of - statements. Note that the definition of declarations is the one - given in the reference manual: - - "Each of the following is defined to be a declaration: any - basic_declaration; an enumeration_literal_specification; a - discriminant_specification; a component_declaration; a - loop_parameter_specification; a parameter_specification; a - subprogram_body; an entry_declaration; an - entry_index_specification; a choice_parameter_specification; a - generic_formal_parameter_declaration." - - This means for example that each enumeration literal adds one to - the count, as well as each subprogram parameter. - - * *Maximal static nesting level of inner program units* - According to :title:`Ada Reference Manual`, 10.1(1): - - "A program unit is either a package, a task unit, a protected - unit, a protected entry, a generic unit, or an explicitly - declared subprogram other than an enumeration literal." - - * *Maximal nesting level of composite syntactic constructs* - This corresponds to the notion of the maximum nesting level in the - GNAT built-in style checks (see :ref:`Style_Checking`). - - * *Number of formal parameters* - Number of formal parameters of a subprogram; if a subprogram does - have parameters, then numbers of "in", "out" and "in out" - parameters are also reported. This metric is reported for - subprogram specifications and for subprogram instantiations. For - subprogram bodies, expression functions and null procedures this - metric is reported if the construct acts as a subprogram - declaration but is not a completion of previous declaration. This - metric is not reported for generic and formal subprograms. - - For the outermost unit in the file, ``gnatmetric`` additionally - computes the following metrics: - - * *Public subprograms* - This metric is computed for package specs. It is the number of - subprograms and generic subprograms declared in the visible part - (including the visible part of nested packages, protected objects, - and protected types). - - - * *All subprograms* - This metric is computed for bodies and subunits. The metric is - equal to a total number of subprogram bodies in the compilation - unit. - Neither generic instantiations nor renamings-as-a-body nor body - stubs are counted. Any subprogram body is counted, independently - of its nesting level and enclosing constructs. Generic bodies and - bodies of protected subprograms are counted in the same way as - 'usual' subprogram bodies. - - - * *Public types* - This metric is computed for package specs and generic package - declarations. It is the total number of types that can be - referenced from outside this compilation unit, plus the number of - types from all the visible parts of all the visible generic - packages. Generic formal types are not counted. Only types, not - subtypes, are included. - - Along with the total number of public types, the following - types are counted and reported separately: - - * *Abstract types* - - * *Root tagged types^ (abstract, non-abstract, private, - non-private). Type extensions are *not* counted - - * *Private types* (including private extensions) - - * *Task types* - - * *Protected types* - - * *All types* - This metric is computed for any compilation unit. It is equal to - the total number of the declarations of different types given in - the compilation unit. The private and the corresponding full type - declaration are counted as one type declaration. Incomplete type - declarations and generic formal types are not counted. - No distinction is made among different kinds of types (abstract, - private etc.); the total number of types is reported. - - By default, all the syntax metrics are reported. You can use the following - switches to select specific syntax metrics. - - - .. index:: --syntax (gnatmetric) - .. index:: --no-syntax (gnatmetric) - - - :switch:`--syntax-all` - Report all the syntax metrics - - - :switch:`--no-syntax-all` - Do not report any of syntax metrics - - - :switch:`--declarations` - Report the total number of declarations - - - :switch:`--no-declarations` - Do not report the total number of declarations - - - :switch:`--statements` - Report the total number of statements - - - :switch:`--no-statements` - Do not report the total number of statements - - - :switch:`--public-subprograms` - Report the number of public subprograms in a compilation unit - - - :switch:`--no-public-subprograms` - Do not report the number of public subprograms in a compilation unit - - - :switch:`--all-subprograms` - Report the number of all the subprograms in a compilation unit - - - :switch:`--no-all-subprograms` - Do not report the number of all the subprograms in a compilation unit - - - :switch:`--public-types` - Report the number of public types in a compilation unit - - - :switch:`--no-public-types` - Do not report the number of public types in a compilation unit - - - :switch:`--all-types` - Report the number of all the types in a compilation unit - - - :switch:`--no-all-types` - Do not report the number of all the types in a compilation unit - - - :switch:`--unit-nesting` - Report the maximal program unit nesting level - - - :switch:`--no-unit-nesting` - Do not report the maximal program unit nesting level - - - :switch:`--construct-nesting` - Report the maximal construct nesting level - - - :switch:`--no-construct-nesting` - Do not report the maximal construct nesting level - - :switch:`--param-number` - Report the number of subprogram parameters - - - :switch:`--no-param-number` - Do not report the number of subprogram parameters - - - .. _Contract_Metrics_Control: - - Contract Metrics Control - ^^^^^^^^^^^^^^^^^^^^^^^^ - - .. index:: Contract metrics control in gnatmetric - - :switch:`--contract-all` - Report all the contract metrics - - - :switch:`--no-contract-all` - Do not report any of the contract metrics - - - :switch:`--contract` - Report the number of public subprograms with contracts - - - :switch:`--no-contract` - Do not report the number of public subprograms with contracts - - - :switch:`--post` - Report the number of public subprograms with postconditions - - - :switch:`--no-post` - Do not report the number of public subprograms with postconditions - - - :switch:`--contract-complete` - Report the number of public subprograms with complete contracts - - - :switch:`--no-contract-complete` - Do not report the number of public subprograms with complete contracts - - - :switch:`--contract-cyclomatic` - Report the McCabe complexity of public subprograms - - - :switch:`--no-contract-cyclomatic` - Do not report the McCabe complexity of public subprograms - - - .. _Complexity_Metrics_Control: - - Complexity Metrics Control - ^^^^^^^^^^^^^^^^^^^^^^^^^^ - - .. index:: Complexity metrics control in gnatmetric - - For a program unit that is an executable body (a subprogram body - (including generic bodies), task body, entry body or a package body - containing its own statement sequence) ``gnatmetric`` computes the - following complexity metrics: - - * McCabe cyclomatic complexity; - - * McCabe essential complexity; - - * maximal loop nesting level; - - * extra exit points (for subprograms); - - The McCabe cyclomatic complexity metric is defined - in `http://www.mccabe.com/pdf/mccabe-nist235r.pdf <http://www.mccabe.com/pdf/mccabe-nist235r.pdf>`_ - - According to McCabe, both control statements and short-circuit control - forms should be taken into account when computing cyclomatic - complexity. For Ada 2012 we have also take into account conditional - expressions and quantified expressions. For each body, we compute - three metric values: - - * the complexity introduced by control - statements only, without taking into account short-circuit forms - (referred as ``statement complexity`` in ``gnatmetric`` output), - - * the complexity introduced by short-circuit control forms only - (referred as ``expression complexity`` in ``gnatmetric`` output), - and - - * the total - cyclomatic complexity, which is the sum of these two values - (referred as ``cyclomatic complexity`` in ``gnatmetric`` output). - - The cyclomatic complexity is also computed for Ada 2012 expression functions. - An expression function cannot have statements as its components, so only one - metric value is computed as a cyclomatic complexity of an expression function. - - The origin of cyclomatic complexity metric is the need to estimate the number - of independent paths in the control flow graph that in turn gives the number - of tests needed to satisfy paths coverage testing completeness criterion. - Considered from the testing point of view, a static Ada ``loop`` (that is, - the ``loop`` statement having static subtype in loop parameter - specification) does not add to cyclomatic complexity. By providing - :switch:`--no-static-loop` option a user - may specify that such loops should not be counted when computing the - cyclomatic complexity metric - - The Ada essential complexity metric is a McCabe cyclomatic complexity metric - counted for the code that is reduced by excluding all the pure structural Ada - control statements. An compound statement is considered as a non-structural - if it contains a ``raise`` or ``return`` statement as it subcomponent, - or if it contains a ``goto`` statement that transfers the control outside - the operator. A selective ``accept`` statement with a ``terminate`` alternative - is considered a non-structural statement. When computing this metric, - ``exit`` statements are treated in the same way as ``goto`` - statements unless the :switch:`-ne` option is specified. - - The Ada essential complexity metric defined here is intended to quantify - the extent to which the software is unstructured. It is adapted from - the McCabe essential complexity metric defined in - http://www.mccabe.com/pdf/mccabe-nist235r.pdf - but is modified to be more - suitable for typical Ada usage. For example, short circuit forms - are not penalized as unstructured in the Ada essential complexity metric. - - When computing cyclomatic and essential complexity, ``gnatmetric`` skips - the code in the exception handlers and in all the nested program units. The - code of assertions and predicates (that is, subprogram preconditions and - postconditions, subtype predicates and type invariants) is also skipped. - - By default, all the complexity metrics are reported. For more fine-grained - control you can use the following switches: - - - .. index:: --complexity (gnatmetric) - .. index:: --no-complexity (gnatmetric) - - - :switch:`--complexity-all` - Report all the complexity metrics - - - :switch:`--no-complexity-all` - Do not report any of the complexity metrics - - - :switch:`--complexity-cyclomatic` - Report the McCabe Cyclomatic Complexity - - - :switch:`--no-complexity-cyclomatic` - Do not report the McCabe Cyclomatic Complexity - - - :switch:`--complexity-essential` - Report the Essential Complexity - - - :switch:`--no-complexity-essential` - Do not report the Essential Complexity - - - :switch:`--loop-nesting` - Report maximal loop nesting level - - - :switch:`--no-loop-nesting` - Do not report maximal loop nesting level - - - :switch:`--complexity-average` - Report the average McCabe Cyclomatic Complexity for all the subprogram bodies, - task bodies, entry bodies and statement sequences in package bodies. - The metric is reported for whole set of processed Ada sources only. - - - :switch:`--no-complexity-average` - Do not report the average McCabe Cyclomatic Complexity for all the subprogram - bodies, task bodies, entry bodies and statement sequences in package bodies - - .. index:: --no-treat-exit-as-goto (gnatmetric) - - - :switch:`--no-treat-exit-as-goto` - Do not consider ``exit`` statements as ``goto``\ s when - computing Essential Complexity - - .. index:: --no-static-loop (gnatmetric) - - - :switch:`--no-static-loop` - Do not consider static loops when computing cyclomatic complexity - - - :switch:`--extra-exit-points` - Report the extra exit points for subprogram bodies. As an exit point, this - metric counts ``return`` statements and raise statements in case when the - raised exception is not handled in the same body. In case of a function this - metric subtracts 1 from the number of exit points, because a function body - must contain at least one ``return`` statement. - - - :switch:`--no-extra-exit-points` - Do not report the extra exit points for subprogram bodies - - - .. _Coupling_Metrics_Control: - - Coupling Metrics Control - ^^^^^^^^^^^^^^^^^^^^^^^^ - - .. index:: Coupling metrics control in gnatmetric - - .. index:: Coupling metrics (in gnatmetric) - - Coupling metrics measure the dependencies between a given entity and other - entities in the program. This information is useful since high coupling - may signal potential issues with maintainability as the program evolves. - - ``gnatmetric`` computes the following coupling metrics: - - - * *object-oriented coupling*, for classes in traditional object-oriented - sense; - - * *unit coupling*, for all the program units making up a program; - - * *control coupling*, reflecting dependencies between a unit and - other units that contain subprograms. - - .. index:: fan-out coupling - .. index:: efferent coupling - - Two kinds of coupling metrics are computed: - - * fan-out coupling ('efferent coupling'): - the number of entities the given entity depends upon. This metric - reflects how the given entity depends on the changes in the - 'external world'. - - .. index:: fan-in coupling - .. index:: afferent coupling - - * fan-in coupling ('afferent' coupling): - the number of entities that depend on a given entity. - This metric reflects how the 'external world' depends on the changes in a - given entity. - - Object-oriented coupling metrics measure the dependencies - between a given class (or a group of classes) and the other classes in the - program. In this subsection the term 'class' is used in its traditional - object-oriented programming sense (an instantiable module that contains data - and/or method members). A *category* (of classes) is a group of closely - related classes that are reused and/or modified together. - - A class ``K``\ 's fan-out coupling is the number of classes - that ``K`` depends upon. - A category's fan-out coupling is the number of classes outside the - category that the classes inside the category depend upon. - - A class ``K``\ 's fan-in coupling is the number of classes - that depend upon ``K``. - A category's fan-in coupling is the number of classes outside the - category that depend on classes belonging to the category. - - Ada's object-oriented paradigm separates the instantiable entity - (type) from the module (package), so the definition of the coupling - metrics for Ada maps the class and class category notions - onto Ada constructs. - - For the coupling metrics, several kinds of modules that define a tagged type - or an interface type -- library packages, library generic packages, and - library generic package instantiations -- are considered to be classes. - A category consists of a library package (or - a library generic package) that defines a tagged or an interface type, - together with all its descendant (generic) packages that define tagged - or interface types. Thus a - category is an Ada hierarchy of library-level program units. Class - coupling in Ada is referred to as 'tagged coupling', and category coupling - is referred to as 'hierarchy coupling'. - - For any package serving as a class, its body and subunits (if any) are - considered together with its spec when computing dependencies, and coupling - metrics are reported for spec units only. Dependencies between classes - mean Ada semantic dependencies. For object-oriented coupling - metrics, only dependencies on units treated as classes are - considered. - - Similarly, for unit and control coupling an entity is considered to be the - conceptual construct consisting of the entity's specification, body, and - any subunits (transitively). - ``gnatmetric`` computes - the dependencies of all these units as a whole, but - metrics are only reported for spec - units (or for a subprogram body unit in case if there is no - separate spec for the given subprogram). - - For unit coupling, dependencies are computed between all kinds of program - units. For control coupling, the dependencies of a given unit are limited to - those units that define subprograms. Thus control fan-out coupling is reported - for all units, but control fan-in coupling is only reported for units - that define subprograms. - - The following simple example illustrates the difference between unit coupling - and control coupling metrics: - - .. code-block:: ada - - package Lib_1 is - function F_1 (I : Integer) return Integer; - end Lib_1; - - package Lib_2 is - type T_2 is new Integer; - end Lib_2; - - package body Lib_1 is - function F_1 (I : Integer) return Integer is - begin - return I + 1; - end F_1; - end Lib_1; - - with Lib_2; use Lib_2; - package Pack is - Var : T_2; - function Fun (I : Integer) return Integer; - end Pack; - - with Lib_1; use Lib_1; - package body Pack is - function Fun (I : Integer) return Integer is - begin - return F_1 (I); - end Fun; - end Pack; - - If we apply ``gnatmetric`` with the :switch:`--coupling-all` option to - these units, the result will be: - - :: - - Coupling metrics: - ================= - Unit Lib_1 (C:\\customers\\662\\L406-007\\lib_1.ads) - control fan-out coupling : 0 - control fan-in coupling : 1 - unit fan-out coupling : 0 - unit fan-in coupling : 1 - - Unit Pack (C:\\customers\\662\\L406-007\\pack.ads) - control fan-out coupling : 1 - control fan-in coupling : 0 - unit fan-out coupling : 2 - unit fan-in coupling : 0 - - Unit Lib_2 (C:\\customers\\662\\L406-007\\lib_2.ads) - control fan-out coupling : 0 - unit fan-out coupling : 0 - unit fan-in coupling : 1 - - The result does not contain values for object-oriented - coupling because none of the argument units contains a tagged type and - therefore none of these units can be treated as a class. - - The ``Pack`` package (spec and body) depends on two - units -- ``Lib_1`` and ``Lib_2`` -- and so its unit fan-out coupling - is 2. Since nothing depends on it, its unit fan-in coupling is 0, as - is its control fan-in coupling. Only one of the units ``Pack`` depends - upon defines a subprogram, so its control fan-out coupling is 1. - - ``Lib_2`` depends on nothing, so its fan-out metrics are 0. It does - not define any subprograms, so it has no control fan-in metric. - One unit (``Pack``) depends on it , so its unit fan-in coupling is 1. - - ``Lib_1`` is similar to ``Lib_2``, but it does define a subprogram. - Its control fan-in coupling is 1 (because there is one unit - depending on it). - - When computing coupling metrics, ``gnatmetric`` counts only - dependencies between units that are arguments of the ``gnatmetric`` - invocation. Coupling metrics are program-wide (or project-wide) metrics, so - you should invoke ``gnatmetric`` for - the complete set of sources comprising your program. This can be done - by invoking ``gnatmetric`` with the corresponding project file - and with the :switch:`-U` option. - - By default, all the coupling metrics are reported. You can use the following - switches to select specific syntax metrics. - - .. index:: --tagged-coupling (gnatmetric) - .. index:: --hierarchy-coupling (gnatmetric) - .. index:: --unit-coupling (gnatmetric) - .. index:: --control-coupling (gnatmetric) - - :switch:`--coupling-all` - Report all the coupling metrics - - - :switch:`--tagged-coupling-out` - Report tagged (class) fan-out coupling - - - :switch:`--tagged-coupling-in` - Report tagged (class) fan-in coupling - - - :switch:`--hierarchy-coupling-out` - Report hierarchy (category) fan-out coupling - - - :switch:`--hierarchy-coupling-in` - Report hierarchy (category) fan-in coupling - - - :switch:`--unit-coupling-out` - Report unit fan-out coupling - - - :switch:`--unit-coupling-in` - Report unit fan-in coupling - - - :switch:`--control-coupling-out` - Report control fan-out coupling - - - :switch:`--control-coupling-in` - Report control fan-in coupling - - - .. _Other_gnatmetric_Switches: - - Other ``gnatmetric`` Switches - ----------------------------- - - Additional ``gnatmetric`` switches are as follows: - - - .. index:: --version (gnatmetric) - - :switch:`--version` - Display copyright and version, then exit disregarding all other options. - - - .. index:: --help (gnatmetric) - - :switch:`--help` - Display usage, then exit disregarding all other options. - - - .. index:: -P (gnatmetric) - - :switch:`-P {file}` - Indicates the name of the project file that describes the set of sources - to be processed. The exact set of argument sources depends on other options - specified, see below. An aggregate project is allowed as the file parameter - only if it has exactly one non-aggregate project being aggregated. - - - .. index:: -U (gnatmetric) - - :switch:`-U` - If a project file is specified and no argument source is explicitly - specified (either directly or by means of :switch:`-files` option), process - all the units of the closure of the argument project. Otherwise this option - has no effect. - - - :switch:`-U {main_unit}` - If a project file is specified and no argument source is explicitly - specified (either directly or by means of :switch:`-files` option), process - the closure of units rooted at ``main_unit``. Otherwise this option - has no effect. - - - .. index:: -X (gnatmetric) - - :switch:`-X{name}={value}` - Indicates that external variable ``name`` in the argument project - has the value ``value``. Has no effect if no project is specified. - - - .. index:: --RTS (gnatmetric) - - :switch:`--RTS={rts-path}` - Specifies the default location of the runtime library. Same meaning as the - equivalent ``gnatmake`` flag (see :ref:`Switches_for_gnatmake`). - - - .. index:: --subdirs=dir (gnatmetric) - - :switch:`--subdirs={dir}` - Use the specified subdirectory of the project objects file (or of the - project file directory if the project does not specify an object directory) - for tool output files. Has no effect if no project is specified as - tool argument r if :switch:`--no-objects-dir` is specified. - - - .. index:: --files (gnatmetric) - - :switch:`--files={file}` - Take as arguments the files listed in text file ``file``. - Text file ``file`` may contain empty lines that are ignored. - Each nonempty line should contain the name of an existing file. - Several such switches may be specified simultaneously. - - - .. index:: --ignore (gnatmetric) - - :switch:`--ignore={filename}` - Do not process the sources listed in a specified file. - - - .. index:: --verbose (gnatmetric) - - :switch:`--verbose` - Verbose mode; - ``gnatmetric`` generates version information and then - a trace of sources being processed. - - - .. index:: --quiet (gnatmetric) - - :switch:`--quiet` - Quiet mode. - - If a project file is specified and no argument source is explicitly - specified (either directly or by means of :switch:`-files` option), and no - :switch:`-U` is specified, then the set of processed sources is - all the immediate units of the argument project. - - - Legacy Switches - ^^^^^^^^^^^^^^^ - - Some switches have a short form, mostly for legacy reasons, - as shown below. - - .. index:: -x (gnatmetric) - - :switch:`-x` - :switch:`--generate-xml-output` - - .. index:: -xs (gnatmetric) - - :switch:`-xs` - :switch:`--generate-xml-schema` - - .. index:: -nt (gnatmetric) - - :switch:`-nt` - :switch:`--no-text-output` - - .. index:: -d (gnatmetric) - - :switch:`-d {output-dir}` - :switch:`--output-dir` - - .. index:: -o (gnatmetric) - - :switch:`-o {file-suffix}` - :switch:`--output-suffix` - - .. index:: -og (gnatmetric) - - :switch:`-og {file-name}` - :switch:`--global-file-name` - - .. index:: -ox (gnatmetric) - - :switch:`-ox {file-name}` - :switch:`--xml-file-name` - - .. index:: -sfn (gnatmetric) - - :switch:`-sfn` - :switch:`--short-file-names` - - .. index:: -W (gnatsmetric) - - :switch:`-W{e}` - :switch:`--wide-character-encoding={e}` - - .. index:: -nolocal (gnatmetric) - - :switch:`-nolocal` - :switch:`--no-local-metrics` - - .. index:: -ne (gnatmetric) - - :switch:`-ne` - :switch:`--no-treat-exit-as-goto` - - .. index:: -files (gnatmetric) - - :switch:`-files {filename}` - :switch:`--files` - - .. index:: -v (gnatmetric) - - :switch:`-v` - :switch:`--verbose` - - .. index:: -q (gnatmetric) - - :switch:`-q` - :switch:`--quiet` - .. only:: PRO or GPL .. _The_GNAT_Pretty_Printer_gnatpp: @@ -3026,7 +1908,7 @@ building specialized scripts. naming conventions. Note that it is no longer necessary to specify the Ada language version; - ``gnatmetric`` can process Ada source code written in any version from + ``gnatstub`` can process Ada source code written in any version from Ada 83 onward without specifying any language version switch. * *switches* diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index b1889fe..48fb107 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -42,17 +42,13 @@ #include "adaint.h" #include <sys/types.h> -#ifdef __MINGW32__ -# if OLD_MINGW -# include <sys/wait.h> -# endif -#elif defined (__vxworks) && defined (__RTP__) +#if defined (__vxworks) && defined (__RTP__) # include <wait.h> #elif defined (__Lynx__) /* ??? See comment in adaint.c. */ # define GCC_RESOURCE_H # include <sys/wait.h> -#elif defined (__PikeOS__) +#elif defined (__PikeOS__) || defined (__MINGW32__) /* No wait.h available */ #else #include <sys/wait.h> diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index cdf8605..64f2e79 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -19,7 +19,7 @@ @copying @quotation -GNAT Reference Manual , Sep 09, 2022 +GNAT Reference Manual , Sep 23, 2022 AdaCore @@ -433,7 +433,7 @@ Implementation Defined Attributes * Attribute Universal_Literal_String:: * Attribute Unrestricted_Access:: * Attribute Update:: -* Attribute Valid_Image:: +* Attribute Valid_Value:: * Attribute Valid_Scalars:: * Attribute VADS_Size:: * Attribute Value_Size:: @@ -10295,7 +10295,7 @@ consideration, you should minimize the use of these attributes. * Attribute Universal_Literal_String:: * Attribute Unrestricted_Access:: * Attribute Update:: -* Attribute Valid_Image:: +* Attribute Valid_Value:: * Attribute Valid_Scalars:: * Attribute VADS_Size:: * Attribute Value_Size:: @@ -12040,7 +12040,7 @@ In general this is a risky approach. It may appear to “work” but such uses o @code{Unrestricted_Access} are potentially non-portable, even from one version of GNAT to another, so are best avoided if possible. -@node Attribute Update,Attribute Valid_Image,Attribute Unrestricted_Access,Implementation Defined Attributes +@node Attribute Update,Attribute Valid_Value,Attribute Unrestricted_Access,Implementation Defined Attributes @anchor{gnat_rm/implementation_defined_attributes attribute-update}@anchor{1ac} @section Attribute Update @@ -12121,19 +12121,19 @@ A := A'Update ((1, 2) => 20, (3, 4) => 30); which changes element (1,2) to 20 and (3,4) to 30. -@node Attribute Valid_Image,Attribute Valid_Scalars,Attribute Update,Implementation Defined Attributes -@anchor{gnat_rm/implementation_defined_attributes attribute-valid-image}@anchor{1ad} -@section Attribute Valid_Image +@node Attribute Valid_Value,Attribute Valid_Scalars,Attribute Update,Implementation Defined Attributes +@anchor{gnat_rm/implementation_defined_attributes attribute-valid-value}@anchor{1ad} +@section Attribute Valid_Value -@geindex Valid_Image +@geindex Valid_Value -The @code{'Valid_Image} attribute is defined for enumeration types other than +The @code{'Valid_Value} attribute is defined for enumeration types other than those in package Standard. This attribute is a function that takes -a String, and returns Boolean. @code{T'Valid_Image (S)} returns True +a String, and returns Boolean. @code{T'Valid_Value (S)} returns True if and only if @code{T'Value (S)} would not raise Constraint_Error. -@node Attribute Valid_Scalars,Attribute VADS_Size,Attribute Valid_Image,Implementation Defined Attributes +@node Attribute Valid_Scalars,Attribute VADS_Size,Attribute Valid_Value,Implementation Defined Attributes @anchor{gnat_rm/implementation_defined_attributes attribute-valid-scalars}@anchor{1ae} @section Attribute Valid_Scalars diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index f2cb1ed..7d96dbe 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -19,7 +19,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Sep 09, 2022 +GNAT User's Guide for Native Platforms , Sep 26, 2022 AdaCore @@ -9220,6 +9220,7 @@ Float_Size : Pos; -- Standard.Float'Size Float_Words_BE : Nat; -- Float words stored big-endian? Int_Size : Pos; -- Standard.Integer'Size Long_Double_Size : Pos; -- Standard.Long_Long_Float'Size +Long_Long_Long_Size : Pos; -- Standard.Long_Long_Long_Integer'Size Long_Long_Size : Pos; -- Standard.Long_Long_Integer'Size Long_Size : Pos; -- Standard.Long_Integer'Size Maximum_Alignment : Pos; -- Maximum permitted alignment @@ -9307,6 +9308,7 @@ Float_Size 32 Float_Words_BE 0 Int_Size 64 Long_Double_Size 128 +Long_Long_Long_Size 128 Long_Long_Size 64 Long_Size 64 Maximum_Alignment 16 @@ -15317,10 +15319,11 @@ Linker switches can be specified after @code{-largs} builder switch. @item @code{-fuse-ld=`name'} -Linker to be used. The default is @code{bfd} for @code{ld.bfd}, -the alternative being @code{gold} for @code{ld.gold}. The later is -a more recent and faster linker, but only available on GNU/Linux +Linker to be used. The default is @code{bfd} for @code{ld.bfd}; @code{gold} +(for @code{ld.gold}) and @code{mold} (for @code{ld.mold}) are more +recent and faster alternatives, but only available on GNU/Linux platforms. + @end table @node Binding with gnatbind,Linking with gnatlink,Linker Switches,Building Executable Programs with GNAT @@ -17932,7 +17935,6 @@ instr.ads - @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit @node GNAT and Program Execution,Platform-Specific Information,GNAT Utility Programs,Top diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h index e7284a1..561f2ff 100644 --- a/gcc/ada/gsocket.h +++ b/gcc/ada/gsocket.h @@ -80,12 +80,6 @@ #define FD_SETSIZE 1024 #ifdef __MINGW32__ -/* winsock2.h allows WSAPoll related definitions only when - * _WIN32_WINNT >= 0x0600 */ -#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 -#define _WIN32_WINNT 0x0600 -#endif - #include <winsock2.h> #include <ws2tcpip.h> #include <versionhelpers.h> diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index 1157fc6..d038211 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -44,11 +44,6 @@ #define UNICODE /* For Win32 API */ #endif -/* We need functionality available only starting with Windows XP */ -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif - #ifndef __CYGWIN__ #include <tchar.h> #endif @@ -99,27 +94,4 @@ extern UINT __gnat_current_ccs_encoding; #define WS2S(str,wstr,len) strncpy(str,wstr,len) #endif -#include <stdlib.h> - -/* STD_MINGW: standard if MINGW32 version > 1.3, we have switched to this - version instead of the previous enhanced version to ease building GNAT on - Windows platforms. By using STD_MINGW or OLD_MINGW it is possible to build - GNAT using both MingW include files (Old MingW + ACT changes and standard - MingW starting with version 1.3. - For w64 Mingw the define STD_MINGW is always set to value 1, because - there is no old header set present. */ -#ifdef _WIN64 -#define STD_MINGW 1 -#else -#define STD_MINGW ((__MINGW32_MAJOR_VERSION == 1 \ - && __MINGW32_MINOR_VERSION >= 3) \ - || (__MINGW32_MAJOR_VERSION >= 2)) -#endif - -#define OLD_MINGW (!(STD_MINGW)) - -#ifndef MAXPATHLEN -#define MAXPATHLEN MAX_PATH -#endif - #endif /* _MINGW32_H */ diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads index 65c6409..24aca2c 100644 --- a/gcc/ada/rtsfind.ads +++ b/gcc/ada/rtsfind.ads @@ -189,7 +189,6 @@ package Rtsfind is -- Children of Interfaces Interfaces_C, - Interfaces_Packed_Decimal, -- Children of Interfaces.C @@ -205,7 +204,6 @@ package Rtsfind is System_Address_To_Access_Conversions, System_Arith_64, System_Arith_128, - System_AST_Handling, System_Assertions, System_Atomic_Operations, System_Atomic_Primitives, @@ -257,9 +255,6 @@ package Rtsfind is System_Fat_LFlt, System_Fat_LLF, System_Fat_SFlt, - System_Fat_VAX_D_Float, - System_Fat_VAX_F_Float, - System_Fat_VAX_G_Float, System_Finalization_Masters, System_Finalization_Root, System_Fore_Decimal_32, @@ -288,14 +283,12 @@ package Rtsfind is System_Img_LLLI, System_Img_LLU, System_Img_LLLU, - System_Img_Name, System_Img_Uns, System_Img_WChar, System_Interrupts, System_Long_Long_Float_Expon, System_Machine_Code, System_Mantissa, - System_Memcop, System_Memory, System_Multiprocessors, System_Pack_03, @@ -420,10 +413,7 @@ package Rtsfind is System_Pack_127, System_Parameters, System_Partition_Interface, - System_Pool_32_Global, System_Pool_Global, - System_Pool_Empty, - System_Pool_Local, System_Pool_Size, System_Put_Images, System_Put_Task_Images, @@ -440,7 +430,6 @@ package Rtsfind is System_Stream_Attributes, System_Task_Info, System_Tasking, - System_Threads, System_Unsigned_Types, System_Val_Bool, System_Val_Char, @@ -461,7 +450,6 @@ package Rtsfind is System_Val_LLLI, System_Val_LLU, System_Val_LLLU, - System_Val_Name, System_Val_Uns, System_Val_WChar, System_Version_Control, @@ -475,7 +463,6 @@ package Rtsfind is System_Wid_LLLI, System_Wid_LLU, System_Wid_LLLU, - System_Wid_Name, System_Wid_Uns, System_Wid_WChar, System_WWd_Char, @@ -484,7 +471,7 @@ package Rtsfind is -- Children of System.Atomic_Operations - System_Atomic_Operations_Test_And_Set, + System_Atomic_Operations_Test_And_Set, -- Children of System.Dim @@ -561,17 +548,13 @@ package Rtsfind is RE_Set_Deadline, -- Ada.Dispatching.EDF - RE_Code_Loc, -- Ada.Exceptions RE_Exception_Id, -- Ada.Exceptions - RE_Exception_Identity, -- Ada.Exceptions RE_Exception_Information, -- Ada.Exceptions RE_Exception_Message, -- Ada.Exceptions RE_Exception_Name_Simple, -- Ada.Exceptions RE_Exception_Occurrence, -- Ada.Exceptions - RE_Exception_Occurrence_Access, -- Ada.Exceptions RE_Null_Id, -- Ada.Exceptions RE_Null_Occurrence, -- Ada.Exceptions - RE_Poll, -- Ada.Exceptions RE_Raise_Exception, -- Ada.Exceptions RE_Raise_Exception_Always, -- Ada.Exceptions RE_Raise_From_Controlled_Operation, -- Ada.Exceptions @@ -596,7 +579,7 @@ package Rtsfind is RE_Names, -- Ada.Interrupts.Names RE_Clock, -- Ada.Real_Time - RE_Clock_Time, -- Ada.Real_Time + RE_Clock_Time, -- Ada.Real_Time [used by GNATprove] RE_Time_Span, -- Ada.Real_Time RE_Time_Span_Zero, -- Ada.Real_Time RO_RT_Time, -- Ada.Real_Time @@ -612,8 +595,6 @@ package Rtsfind is RE_Stream_Element_Array, -- Ada.Streams RE_Stream_Element_Offset, -- Ada.Streams - RE_Stream_Access, -- Ada.Streams.Stream_IO - RO_SU_Super_String, -- Ada.Strings.Superbounded RO_WI_Super_String, -- Ada.Strings.Wide_Superbounded @@ -628,8 +609,6 @@ package Rtsfind is RE_Buffer_Type, -- Ada.Strings.Text_Buffers.Unbounded RE_Get, -- Ada.Strings.Text_Buffers.Unbounded - RE_Wide_Get, -- Ada.Strings.Text_Buffers.Unbounded - RE_Wide_Wide_Get, -- Ada.Strings.Text_Buffers.Unbounded RE_Wait_For_Release, -- Ada.Synchronous_Barriers @@ -641,7 +620,6 @@ package Rtsfind is RE_Address_Array, -- Ada.Tags RE_Addr_Ptr, -- Ada.Tags RE_Base_Address, -- Ada.Tags - RE_Check_Interface_Conversion, -- Ada.Tags RE_Check_TSD, -- Ada.Tags RE_Cstring_Ptr, -- Ada.Tags RE_CW_Membership, -- Ada.Tags @@ -656,13 +634,11 @@ package Rtsfind is RE_External_Tag, -- Ada.Tags RO_TA_External_Tag, -- Ada.Tags RE_Get_Access_Level, -- Ada.Tags - RE_Get_Alignment, -- Ada.Tags RE_Get_Entry_Index, -- Ada.Tags RE_Get_Offset_Index, -- Ada.Tags RE_Get_Prim_Op_Kind, -- Ada.Tags RE_Get_Tagged_Kind, -- Ada.Tags RE_HT_Link, -- Ada.Tags - RE_Idepth, -- Ada.Tags RE_Interfaces_Array, -- Ada.Tags RE_Interfaces_Table, -- Ada.Tags RE_Interface_Data, -- Ada.Tags @@ -675,8 +651,6 @@ package Rtsfind is RE_No_Dispatch_Table_Wrapper, -- Ada.Tags RE_No_Tag, -- Ada.Tags RE_NDT_Prims_Ptr, -- Ada.Tags - RE_NDT_TSD, -- Ada.Tags - RE_Num_Prims, -- Ada.Tags RE_Object_Specific_Data, -- Ada.Tags RE_Offset_To_Top, -- Ada.Tags RE_Offset_To_Top_Ptr, -- Ada.Tags @@ -699,11 +673,9 @@ package Rtsfind is RE_Primary_DT, -- Ada.Tags RE_Signature, -- Ada.Tags RE_SSD, -- Ada.Tags - RE_TSD, -- Ada.Tags RE_Type_Specific_Data, -- Ada.Tags RE_Register_Interface_Offset, -- Ada.Tags RE_Register_Tag, -- Ada.Tags - RE_Register_TSD, -- Ada.Tags RE_Transportable, -- Ada.Tags RE_Secondary_DT, -- Ada.Tags RE_Secondary_Tag, -- Ada.Tags @@ -749,7 +721,6 @@ package Rtsfind is RE_Stream_T, -- CUDA.Driver_Types - RE_Fatbin_Wrapper, -- CUDA.Internal RE_Launch_Kernel, -- CUDA.Internal RE_Pop_Call_Configuration, -- CUDA.Internal RE_Push_Call_Configuration, -- CUDA.Internal @@ -772,19 +743,14 @@ package Rtsfind is RO_IC_Unsigned, -- Interfaces.C - RE_Chars_Ptr, -- Interfaces.C.Strings - RE_New_Char_Array, -- Interfaces.C.Strings - RE_Address, -- System RE_Any_Priority, -- System RE_Bit_Order, -- System RE_Default_Priority, -- System RE_High_Order_First, -- System RE_Interrupt_Priority, -- System - RE_Lib_Stop, -- System RE_Low_Order_First, -- System RE_Max_Base_Digits, -- System - RE_Max_Priority, -- System RE_Null_Address, -- System RE_Priority, -- System @@ -802,8 +768,6 @@ package Rtsfind is RE_Subtract_With_Ovflo_Check128, -- System.Arith_128 RE_Scaled_Divide128, -- System.Arith_128 - RE_Create_AST_Handler, -- System.AST_Handling - RE_Assert_Failure, -- System.Assertions RE_Raise_Assert_Failure, -- System.Assertions @@ -824,9 +788,6 @@ package Rtsfind is RE_Atomic_Test_And_Set, -- System.Atomic_Operations.Test_And_Set RE_AST_Handler, -- System.Aux_DEC - RE_Import_Address, -- System.Aux_DEC - RE_Import_Value, -- System.Aux_DEC - RE_No_AST_Handler, -- System.Aux_DEC RE_Type_Class, -- System.Aux_DEC RE_Type_Class_Enumeration, -- System.Aux_DEC RE_Type_Class_Integer, -- System.Aux_DEC @@ -954,15 +915,6 @@ package Rtsfind is RE_Attr_Long_Long_Float, -- System.Fat_LLF - RE_Attr_VAX_D_Float, -- System.Fat_VAX_D_Float - RE_Fat_VAX_D, -- System.Fat_VAX_D_Float - - RE_Attr_VAX_F_Float, -- System.Fat_VAX_F_Float - RE_Fat_VAX_F, -- System.Fat_VAX_F_Float - - RE_Attr_VAX_G_Float, -- System.Fat_VAX_G_Float - RE_Fat_VAX_G, -- System.Fat_VAX_G_Float - RE_Add_Offset_To_Address, -- System.Finalization_Masters RE_Attach, -- System.Finalization_Masters RE_Base_Pool, -- System.Finalization_Masters @@ -970,10 +922,8 @@ package Rtsfind is RE_Finalization_Master_Ptr, -- System.Finalization_Masters RE_Set_Base_Pool, -- System.Finalization_Masters RE_Set_Finalize_Address, -- System.Finalization_Masters - RE_Set_Is_Heterogeneous, -- System.Finalization_Masters RE_Root_Controlled, -- System.Finalization_Root - RE_Root_Controlled_Ptr, -- System.Finalization_Root RE_Fore_Decimal32, -- System.Fore_Decimal_32 @@ -1649,9 +1599,7 @@ package Rtsfind is RE_Set_127, -- System.Pack_127 RE_Adjust_Storage_Size, -- System.Parameters - RE_Default_Secondary_Stack_Size, -- System.Parameters RE_Default_Stack_Size, -- System.Parameters - RE_Garbage_Collected, -- System.Parameters RE_Size_Type, -- System.Parameters RE_Unspecified_Size, -- System.Parameters @@ -1677,8 +1625,6 @@ package Rtsfind is RE_Global_Pool_Object, -- System.Pool_Global - RE_Global_Pool_32_Object, -- System.Pool_32_Global - RE_Stack_Bounded_Pool, -- System.Pool_Size RE_Put_Image_Integer, -- System.Put_Images @@ -1744,11 +1690,8 @@ package Rtsfind is RE_Set_Result, -- System.Partition_Interface RE_Register_Obj_Receiving_Stub, -- System.Partition_Interface RE_Register_Pkg_Receiving_Stub, -- System.Partition_Interface - RE_Is_Nil, -- System.Partition_Interface - RE_Entity_Ptr, -- System.Partition_Interface RE_Entity_Of, -- System.Partition_Interface RE_Inc_Usage, -- System.Partition_Interface - RE_Set_Ref, -- System.Partition_Interface RE_Make_Ref, -- System.Partition_Interface RE_Get_Local_Address, -- System.Partition_Interface RE_Get_Reference, -- System.Partition_Interface @@ -1881,8 +1824,6 @@ package Rtsfind is RE_Deallocate_Any_Controlled, -- System.Storage_Pools.Subpools RE_Header_Size_With_Padding, -- System.Storage_Pools.Subpools RE_Root_Storage_Pool_With_Subpools, -- System.Storage_Pools.Subpools - RE_Root_Subpool, -- System.Storage_Pools.Subpools - RE_Subpool_Handle, -- System.Storage_Pools.Subpools RE_I_AD, -- System.Stream_Attributes RE_I_AS, -- System.Stream_Attributes @@ -2006,7 +1947,6 @@ package Rtsfind is RE_Simple_Mode, -- System.Tasking RE_Terminate_Mode, -- System.Tasking RE_Delay_Mode, -- System.Tasking - RE_Entry_Index, -- System.Tasking RE_Task_Entry_Index, -- System.Tasking RE_Self, -- System.Tasking @@ -2244,17 +2184,13 @@ package Rtsfind is RE_Set_Deadline => Ada_Dispatching_EDF, - RE_Code_Loc => Ada_Exceptions, RE_Exception_Id => Ada_Exceptions, - RE_Exception_Identity => Ada_Exceptions, RE_Exception_Information => Ada_Exceptions, RE_Exception_Message => Ada_Exceptions, RE_Exception_Name_Simple => Ada_Exceptions, RE_Exception_Occurrence => Ada_Exceptions, - RE_Exception_Occurrence_Access => Ada_Exceptions, RE_Null_Id => Ada_Exceptions, RE_Null_Occurrence => Ada_Exceptions, - RE_Poll => Ada_Exceptions, RE_Raise_Exception => Ada_Exceptions, RE_Raise_Exception_Always => Ada_Exceptions, RE_Raise_From_Controlled_Operation => Ada_Exceptions, @@ -2295,8 +2231,6 @@ package Rtsfind is RE_Stream_Element_Array => Ada_Streams, RE_Stream_Element_Offset => Ada_Streams, - RE_Stream_Access => Ada_Streams_Stream_IO, - RO_SU_Super_String => Ada_Strings_Superbounded, RO_WI_Super_String => Ada_Strings_Wide_Superbounded, @@ -2311,8 +2245,6 @@ package Rtsfind is RE_Buffer_Type => Ada_Strings_Text_Buffers_Unbounded, RE_Get => Ada_Strings_Text_Buffers_Unbounded, - RE_Wide_Get => Ada_Strings_Text_Buffers_Unbounded, - RE_Wide_Wide_Get => Ada_Strings_Text_Buffers_Unbounded, RE_Wait_For_Release => Ada_Synchronous_Barriers, @@ -2324,7 +2256,6 @@ package Rtsfind is RE_Address_Array => Ada_Tags, RE_Addr_Ptr => Ada_Tags, RE_Base_Address => Ada_Tags, - RE_Check_Interface_Conversion => Ada_Tags, RE_Check_TSD => Ada_Tags, RE_Cstring_Ptr => Ada_Tags, RE_CW_Membership => Ada_Tags, @@ -2339,13 +2270,11 @@ package Rtsfind is RE_External_Tag => Ada_Tags, RO_TA_External_Tag => Ada_Tags, RE_Get_Access_Level => Ada_Tags, - RE_Get_Alignment => Ada_Tags, RE_Get_Entry_Index => Ada_Tags, RE_Get_Offset_Index => Ada_Tags, RE_Get_Prim_Op_Kind => Ada_Tags, RE_Get_Tagged_Kind => Ada_Tags, RE_HT_Link => Ada_Tags, - RE_Idepth => Ada_Tags, RE_Interfaces_Array => Ada_Tags, RE_Interfaces_Table => Ada_Tags, RE_Interface_Data => Ada_Tags, @@ -2358,8 +2287,6 @@ package Rtsfind is RE_No_Dispatch_Table_Wrapper => Ada_Tags, RE_No_Tag => Ada_Tags, RE_NDT_Prims_Ptr => Ada_Tags, - RE_NDT_TSD => Ada_Tags, - RE_Num_Prims => Ada_Tags, RE_Object_Specific_Data => Ada_Tags, RE_Offset_To_Top => Ada_Tags, RE_Offset_To_Top_Ptr => Ada_Tags, @@ -2382,11 +2309,9 @@ package Rtsfind is RE_Primary_DT => Ada_Tags, RE_Signature => Ada_Tags, RE_SSD => Ada_Tags, - RE_TSD => Ada_Tags, RE_Type_Specific_Data => Ada_Tags, RE_Register_Interface_Offset => Ada_Tags, RE_Register_Tag => Ada_Tags, - RE_Register_TSD => Ada_Tags, RE_Transportable => Ada_Tags, RE_Secondary_DT => Ada_Tags, RE_Secondary_Tag => Ada_Tags, @@ -2432,7 +2357,6 @@ package Rtsfind is RE_Stream_T => CUDA_Driver_Types, - RE_Fatbin_Wrapper => CUDA_Internal, RE_Launch_Kernel => CUDA_Internal, RE_Pop_Call_Configuration => CUDA_Internal, RE_Push_Call_Configuration => CUDA_Internal, @@ -2455,19 +2379,14 @@ package Rtsfind is RO_IC_Unsigned => Interfaces_C, - RE_Chars_Ptr => Interfaces_C_Strings, - RE_New_Char_Array => Interfaces_C_Strings, - RE_Address => System, RE_Any_Priority => System, RE_Bit_Order => System, RE_Default_Priority => System, RE_High_Order_First => System, RE_Interrupt_Priority => System, - RE_Lib_Stop => System, RE_Low_Order_First => System, RE_Max_Base_Digits => System, - RE_Max_Priority => System, RE_Null_Address => System, RE_Priority => System, @@ -2485,8 +2404,6 @@ package Rtsfind is RE_Subtract_With_Ovflo_Check128 => System_Arith_128, RE_Scaled_Divide128 => System_Arith_128, - RE_Create_AST_Handler => System_AST_Handling, - RE_Assert_Failure => System_Assertions, RE_Raise_Assert_Failure => System_Assertions, @@ -2507,9 +2424,6 @@ package Rtsfind is RE_Atomic_Test_And_Set => System_Atomic_Operations_Test_And_Set, RE_AST_Handler => System_Aux_DEC, - RE_Import_Address => System_Aux_DEC, - RE_Import_Value => System_Aux_DEC, - RE_No_AST_Handler => System_Aux_DEC, RE_Type_Class => System_Aux_DEC, RE_Type_Class_Enumeration => System_Aux_DEC, RE_Type_Class_Integer => System_Aux_DEC, @@ -2643,15 +2557,6 @@ package Rtsfind is RE_Attr_Long_Long_Float => System_Fat_LLF, - RE_Attr_VAX_D_Float => System_Fat_VAX_D_Float, - RE_Fat_VAX_D => System_Fat_VAX_D_Float, - - RE_Attr_VAX_F_Float => System_Fat_VAX_F_Float, - RE_Fat_VAX_F => System_Fat_VAX_F_Float, - - RE_Attr_VAX_G_Float => System_Fat_VAX_G_Float, - RE_Fat_VAX_G => System_Fat_VAX_G_Float, - RE_Add_Offset_To_Address => System_Finalization_Masters, RE_Attach => System_Finalization_Masters, RE_Base_Pool => System_Finalization_Masters, @@ -2659,10 +2564,8 @@ package Rtsfind is RE_Finalization_Master_Ptr => System_Finalization_Masters, RE_Set_Base_Pool => System_Finalization_Masters, RE_Set_Finalize_Address => System_Finalization_Masters, - RE_Set_Is_Heterogeneous => System_Finalization_Masters, RE_Root_Controlled => System_Finalization_Root, - RE_Root_Controlled_Ptr => System_Finalization_Root, RE_Fore_Decimal32 => System_Fore_Decimal_32, @@ -3340,9 +3243,7 @@ package Rtsfind is RE_Set_127 => System_Pack_127, RE_Adjust_Storage_Size => System_Parameters, - RE_Default_Secondary_Stack_Size => System_Parameters, RE_Default_Stack_Size => System_Parameters, - RE_Garbage_Collected => System_Parameters, RE_Size_Type => System_Parameters, RE_Unspecified_Size => System_Parameters, @@ -3399,11 +3300,8 @@ package Rtsfind is RE_Set_Result => System_Partition_Interface, RE_Register_Obj_Receiving_Stub => System_Partition_Interface, RE_Register_Pkg_Receiving_Stub => System_Partition_Interface, - RE_Is_Nil => System_Partition_Interface, - RE_Entity_Ptr => System_Partition_Interface, RE_Entity_Of => System_Partition_Interface, RE_Inc_Usage => System_Partition_Interface, - RE_Set_Ref => System_Partition_Interface, RE_Make_Ref => System_Partition_Interface, RE_Get_Local_Address => System_Partition_Interface, RE_Get_Reference => System_Partition_Interface, @@ -3488,8 +3386,6 @@ package Rtsfind is RE_Global_Pool_Object => System_Pool_Global, - RE_Global_Pool_32_Object => System_Pool_32_Global, - RE_Stack_Bounded_Pool => System_Pool_Size, RE_Put_Image_Integer => System_Put_Images, @@ -3572,8 +3468,6 @@ package Rtsfind is RE_Deallocate_Any_Controlled => System_Storage_Pools_Subpools, RE_Header_Size_With_Padding => System_Storage_Pools_Subpools, RE_Root_Storage_Pool_With_Subpools => System_Storage_Pools_Subpools, - RE_Root_Subpool => System_Storage_Pools_Subpools, - RE_Subpool_Handle => System_Storage_Pools_Subpools, RE_I_AD => System_Stream_Attributes, RE_I_AS => System_Stream_Attributes, @@ -3697,7 +3591,6 @@ package Rtsfind is RE_Simple_Mode => System_Tasking, RE_Terminate_Mode => System_Tasking, RE_Delay_Mode => System_Tasking, - RE_Entry_Index => System_Tasking, RE_Task_Entry_Index => System_Tasking, RE_Self => System_Tasking, diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index af69190..5394122 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -237,9 +237,6 @@ int counter = 0; #define CST(name,comment) C(#name,String,name,comment) /* String constant */ -#define STR(x) STR1(x) -#define STR1(x) #x - #ifdef __MINGW32__ unsigned int _CRT_fmode = _O_BINARY; #endif diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 9525140..ab2e182 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -6296,13 +6296,16 @@ package body Sem_Ch12 is Old_Main : constant Entity_Id := Cunit_Entity (Main_Unit); begin - -- A new compilation unit node is built for the instance declaration + -- A new compilation unit node is built for the instance declaration. + -- It relocates the auxiliary declaration node from the compilation unit + -- where the instance appeared, so that declarations that originally + -- followed the instance will be attached to the spec compilation unit. Decl_Cunit := Make_Compilation_Unit (Sloc (N), Context_Items => Empty_List, Unit => Act_Decl, - Aux_Decls_Node => Make_Compilation_Unit_Aux (Sloc (N))); + Aux_Decls_Node => Relocate_Node (Aux_Decls_Node (Parent (N)))); Set_Parent_Spec (Act_Decl, Parent_Spec (N)); diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 17bf6d9..d0f00b3 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -2429,13 +2429,9 @@ package body Sem_Ch5 is if not Is_Entity_Name (Iter_Name) - -- When the context is a quantified expression, the renaming - -- declaration is delayed until the expansion phase if we are - -- doing expansion. + -- Do not perform this expansion in preanalysis - and then (Nkind (Parent (N)) /= N_Quantified_Expression - or else (Operating_Mode = Check_Semantics - and then not GNATprove_Mode)) + and then Full_Analysis -- Do not perform this expansion when expansion is disabled, where the -- temporary may hide the transformation of a selected component into diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b0babeb..9ae082c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -531,7 +531,7 @@ package body Sem_Util is -- Local variables - E : Entity_Id := Original_Node (Expr); + E : Node_Id := Original_Node (Expr); Pre : Node_Id; -- Start of processing for Accessibility_Level @@ -777,8 +777,18 @@ package body Sem_Util is -- We don't handle function calls in prefix notation correctly ??? - when N_Indexed_Component | N_Selected_Component => - Pre := Original_Node (Prefix (E)); + when N_Indexed_Component | N_Selected_Component | N_Slice => + Pre := Prefix (E); + + -- Fetch the original node when the prefix comes from the result + -- of expanding a function call since we want to find the level + -- of the original source call. + + if not Comes_From_Source (Pre) + and then Nkind (Original_Node (Pre)) = N_Function_Call + then + Pre := Original_Node (Pre); + end if; -- When E is an indexed component or selected component and -- the current Expr is a function call, we know that we are @@ -26549,6 +26559,14 @@ package body Sem_Util is Item_Nam := Chars (Original_Node (Pragma_Identifier (Original_Node (Item)))); + if Item_Nam = Name_Check then + -- Pragma "Check" preserves the original pragma name as its first + -- argument. + Item_Nam := + Chars (Expression (First (Pragma_Argument_Associations + (Original_Node (Item))))); + end if; + else pragma Assert (Nkind (Item) = N_Aspect_Specification); Item_Nam := Chars (Identifier (Item)); diff --git a/gcc/ada/sem_warn.ads b/gcc/ada/sem_warn.ads index 1894f36..6681e54 100644 --- a/gcc/ada/sem_warn.ads +++ b/gcc/ada/sem_warn.ads @@ -257,12 +257,9 @@ package Sem_Warn is ---------------------- function Has_Junk_Name (E : Entity_Id) return Boolean; - -- Return True if the entity name contains any of the following substrings: - -- discard - -- dummy - -- ignore - -- junk - -- unused + -- Return True if the entity name contains substrings like "junk" or + -- "dummy" (see the body for the complete list). + -- -- Used to suppress warnings on names matching these patterns. The contents -- of Name_Buffer and Name_Len are destroyed by this call. diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 5e9cf70..7bdfcbc 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -323,11 +323,7 @@ __gnat_ttyname (int filedes ATTRIBUTE_UNUSED) || defined (__QNX__) # ifdef __MINGW32__ -# if OLD_MINGW -# include <termios.h> -# else -# include <conio.h> /* for getch(), kbhit() */ -# endif +# include <conio.h> /* for getch(), kbhit() */ # else # include <termios.h> # endif |