Commit c2658843 by Arnaud Charlet

[multiple changes]

2013-04-12  Bob Duff  <duff@adacore.com>

	* par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
	stack entry.

2013-04-12  Robert Dewar  <dewar@adacore.com>

	* switch-c.adb: Minor fix to wording of error message for
	-gnatet/eT.

2013-04-12  Robert Dewar  <dewar@adacore.com>

	* impunit.adb: Add s-multip and s-mudido to list of impl defined
	system units.
	* gnat_rm.texi: Add documentation for
	System.Multiprocessors[.Dispatching_Domains].

2013-04-12  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Completion of menu cleanups.

2013-04-12  Arnaud Charlet  <charlet@adacore.com>

	* sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
	in Relaxed_RM_Semantics.

2013-04-12  Arnaud Charlet  <charlet@adacore.com>

	* set_targ.adb (elab code): Add support for non gcc back-ends
	where save_argv is null.

From-SVN: r197899
parent 340772c0
2013-04-12 Bob Duff <duff@adacore.com>
* par-ch7.adb (P_Package): Initialize Sloc in the newly-pushed scope
stack entry.
2013-04-12 Robert Dewar <dewar@adacore.com>
* switch-c.adb: Minor fix to wording of error message for
-gnatet/eT.
2013-04-12 Robert Dewar <dewar@adacore.com>
* impunit.adb: Add s-multip and s-mudido to list of impl defined
system units.
* gnat_rm.texi: Add documentation for
System.Multiprocessors[.Dispatching_Domains].
2013-04-12 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi: Completion of menu cleanups.
2013-04-12 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Diagnose_Multiple_Pragmas): Relax the rules
in Relaxed_RM_Semantics.
2013-04-12 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb (elab code): Add support for non gcc back-ends
where save_argv is null.
2013-04-12 Robert Dewar <dewar@adacore.com> 2013-04-12 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name. * gnat1drv.adb (Gnat1drv): Test Target_Dependent_Info_Write_Name.
......
...@@ -548,6 +548,8 @@ The GNAT Library ...@@ -548,6 +548,8 @@ The GNAT Library
* System.Address_Image (s-addima.ads):: * System.Address_Image (s-addima.ads)::
* System.Assertions (s-assert.ads):: * System.Assertions (s-assert.ads)::
* System.Memory (s-memory.ads):: * System.Memory (s-memory.ads)::
* System.Multiprocessors (s-multip.ads)::
* System.Multiprocessors.Dispatching_Domains (s-mudido.ads)::
* System.Partition_Interface (s-parint.ads):: * System.Partition_Interface (s-parint.ads)::
* System.Pool_Global (s-pooglo.ads):: * System.Pool_Global (s-pooglo.ads)::
* System.Pool_Local (s-pooloc.ads):: * System.Pool_Local (s-pooloc.ads)::
...@@ -15508,6 +15510,8 @@ of GNAT, and will generate a warning message. ...@@ -15508,6 +15510,8 @@ of GNAT, and will generate a warning message.
* System.Address_Image (s-addima.ads):: * System.Address_Image (s-addima.ads)::
* System.Assertions (s-assert.ads):: * System.Assertions (s-assert.ads)::
* System.Memory (s-memory.ads):: * System.Memory (s-memory.ads)::
* System.Multiprocessors (s-multip.ads)::
* System.Multiprocessors.Dispatching_Domains (s-mudido.ads)::
* System.Partition_Interface (s-parint.ads):: * System.Partition_Interface (s-parint.ads)::
* System.Pool_Global (s-pooglo.ads):: * System.Pool_Global (s-pooglo.ads)::
* System.Pool_Local (s-pooloc.ads):: * System.Pool_Local (s-pooloc.ads)::
...@@ -16970,6 +16974,22 @@ allocation mechanisms for the default pool, and in addition, direct ...@@ -16970,6 +16974,22 @@ allocation mechanisms for the default pool, and in addition, direct
calls to this unit may be made for low level allocation uses (for calls to this unit may be made for low level allocation uses (for
example see the body of @code{GNAT.Tables}). example see the body of @code{GNAT.Tables}).
@node System.Multiprocessors (s-multip.ads)
@section @code{System.Multiprocessors} (@file{s-multip.ads})
@cindex @code{System.Multiprocessors} (@file{s-multip.ads})
@cindex Multiprocessor interface
This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but
in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System.Multiprocessors.Dispatching_Domains (s-mudido.ads)
@section @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads})
@cindex @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads})
@cindex Multiprocessor interface
This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but
in GNAT we also make it available in Ada 95 and Ada 2005 (where it is
technically an implementation-defined addition).
@node System.Partition_Interface (s-parint.ads) @node System.Partition_Interface (s-parint.ads)
@section @code{System.Partition_Interface} (@file{s-parint.ads}) @section @code{System.Partition_Interface} (@file{s-parint.ads})
@cindex @code{System.Partition_Interface} (@file{s-parint.ads}) @cindex @code{System.Partition_Interface} (@file{s-parint.ads})
......
...@@ -169,32 +169,32 @@ AdaCore@* ...@@ -169,32 +169,32 @@ AdaCore@*
* About This Guide:: * About This Guide::
* Getting Started with GNAT:: * Getting Started with GNAT::
* The GNAT Compilation Model:: * The GNAT Compilation Model::
* Compiling With gcc:: * Compiling with gcc::
* Binding With gnatbind:: * Binding with gnatbind::
* Linking With gnatlink:: * Linking with gnatlink::
* The GNAT Make Program gnatmake:: * The GNAT Make Program gnatmake::
* Improving Performance:: * Improving Performance::
* Renaming Files Using gnatchop:: * Renaming Files with gnatchop::
* Configuration Pragmas:: * Configuration Pragmas::
* Handling Arbitrary File Naming Conventions Using gnatname:: * Handling Arbitrary File Naming Conventions with gnatname::
* GNAT Project Manager:: * GNAT Project Manager::
* Tools Supporting Project Files:: * Tools Supporting Project Files::
* The Cross-Referencing Tools gnatxref and gnatfind:: * The Cross-Referencing Tools gnatxref and gnatfind::
* The GNAT Pretty-Printer gnatpp:: * The GNAT Pretty-Printer gnatpp::
* The GNAT Metric Tool gnatmetric:: * The GNAT Metrics Tool gnatmetric::
* File Name Krunching Using gnatkr:: * File Name Krunching with gnatkr::
* Preprocessing Using gnatprep:: * Preprocessing with gnatprep::
* The GNAT Library Browser gnatls:: * The GNAT Library Browser gnatls::
* Cleaning Up Using gnatclean:: * Cleaning Up with gnatclean::
@ifclear vms @ifclear vms
* GNAT and Libraries:: * GNAT and Libraries::
* Using the GNU make Utility:: * Using the GNU make Utility::
@end ifclear @end ifclear
* Memory Management Issues:: * Memory Management Issues::
* Stack Related Facilities:: * Stack Related Facilities::
* Verifying Properties Using gnatcheck:: * Verifying Properties with gnatcheck::
* Creating Sample Bodies Using gnatstub:: * Creating Sample Bodies with gnatstub::
* Creating Unit Tests Using gnattest:: * Creating Unit Tests with gnattest::
* Performing Dimensionality Analysis in GNAT:: * Performing Dimensionality Analysis in GNAT::
* Generating Ada Bindings for C and C++ headers:: * Generating Ada Bindings for C and C++ headers::
* Other Utility Programs:: * Other Utility Programs::
...@@ -257,21 +257,21 @@ The GNAT Compilation Model ...@@ -257,21 +257,21 @@ The GNAT Compilation Model
* Placement of temporary files:: * Placement of temporary files::
@end ifset @end ifset
Compiling With gcc Compiling with gcc
* Compiling Programs:: * Compiling Programs::
* Switches for gcc:: * Switches for gcc::
* Search Paths and the Run-Time Library (RTL):: * Search Paths and the Run-Time Library (RTL)::
* Order of Compilation Issues:: * Order of Compilation Issues::
* Examples:: * Examples::
Binding With gnatbind Binding with gnatbind
* Running gnatbind:: * Running gnatbind::
* Switches for gnatbind:: * Switches for gnatbind::
* Command-Line Access:: * Command-Line Access::
* Search Paths for gnatbind:: * Search Paths for gnatbind::
* Examples of gnatbind Usage:: * Examples of gnatbind Usage::
Linking With gnatlink Linking with gnatlink
* Running gnatlink:: * Running gnatlink::
* Switches for gnatlink:: * Switches for gnatlink::
...@@ -289,7 +289,7 @@ Improving Performance ...@@ -289,7 +289,7 @@ Improving Performance
* Reducing Size of Ada Executables with gnatelim:: * Reducing Size of Ada Executables with gnatelim::
* Reducing Size of Executables with unused subprogram/data elimination:: * Reducing Size of Executables with unused subprogram/data elimination::
Renaming Files Using gnatchop Renaming Files with gnatchop
* Handling Files with Multiple Units:: * Handling Files with Multiple Units::
* Operating gnatchop in Compilation Mode:: * Operating gnatchop in Compilation Mode::
* Command Line for gnatchop:: * Command Line for gnatchop::
...@@ -300,7 +300,7 @@ Configuration Pragmas ...@@ -300,7 +300,7 @@ Configuration Pragmas
* Handling of Configuration Pragmas:: * Handling of Configuration Pragmas::
* The Configuration Pragmas Files:: * The Configuration Pragmas Files::
Handling Arbitrary File Naming Conventions Using gnatname Handling Arbitrary File Naming Conventions with gnatname
* Arbitrary File Naming Conventions:: * Arbitrary File Naming Conventions::
* Running gnatname:: * Running gnatname::
* Switches for gnatname:: * Switches for gnatname::
...@@ -318,11 +318,8 @@ GNAT Project Manager ...@@ -318,11 +318,8 @@ GNAT Project Manager
* Project File Reference:: * Project File Reference::
Tools Supporting Project Files Tools Supporting Project Files
* Switches Related to Project Files:: * gnatmake and Project Files::
* Switches and Project Files:: * The GNAT Driver and Project Files::
* Specifying Configuration Pragmas::
* Project Files and Main Subprograms::
* Library Project Files::
The Cross-Referencing Tools gnatxref and gnatfind The Cross-Referencing Tools gnatxref and gnatfind
* Switches for gnatxref:: * Switches for gnatxref::
...@@ -339,13 +336,13 @@ The GNAT Pretty-Printer gnatpp ...@@ -339,13 +336,13 @@ The GNAT Pretty-Printer gnatpp
The GNAT Metrics Tool gnatmetric The GNAT Metrics Tool gnatmetric
* Switches for gnatmetric:: * Switches for gnatmetric::
File Name Krunching Using gnatkr File Name Krunching with gnatkr
* About gnatkr:: * About gnatkr::
* Using gnatkr:: * Using gnatkr::
* Krunching Method:: * Krunching Method::
* Examples of gnatkr Usage:: * Examples of gnatkr Usage::
Preprocessing Using gnatprep Preprocessing with gnatprep
* Preprocessing Symbols:: * Preprocessing Symbols::
* Using gnatprep:: * Using gnatprep::
* Switches for gnatprep:: * Switches for gnatprep::
...@@ -357,7 +354,7 @@ The GNAT Library Browser gnatls ...@@ -357,7 +354,7 @@ The GNAT Library Browser gnatls
* Switches for gnatls:: * Switches for gnatls::
* Examples of gnatls Usage:: * Examples of gnatls Usage::
Cleaning Up Using gnatclean Cleaning Up with gnatclean
* Running gnatclean:: * Running gnatclean::
* Switches for gnatclean:: * Switches for gnatclean::
@c * Examples of gnatclean Usage:: @c * Examples of gnatclean Usage::
...@@ -388,13 +385,13 @@ Stack Related Facilities ...@@ -388,13 +385,13 @@ Stack Related Facilities
* Static Stack Usage Analysis:: * Static Stack Usage Analysis::
* Dynamic Stack Usage Analysis:: * Dynamic Stack Usage Analysis::
Verifying Properties Using gnatcheck Verifying Properties with gnatcheck
Creating Sample Bodies Using gnatstub Creating Sample Bodies with gnatstub
* Running gnatstub:: * Running gnatstub::
* Switches for gnatstub:: * Switches for gnatstub::
Creating Unit Tests Using gnattest Creating Unit Tests with gnattest
* Running gnattest:: * Running gnattest::
* Switches for gnattest:: * Switches for gnattest::
* Project Attributes for gnattest:: * Project Attributes for gnattest::
...@@ -431,8 +428,8 @@ Other Utility Programs ...@@ -431,8 +428,8 @@ Other Utility Programs
@ifclear vms @ifclear vms
Code Coverage and Profiling Code Coverage and Profiling
* Code Coverage of Ada Programs using gcov:: * Code Coverage of Ada Programs with gcov::
* Profiling an Ada Program using gprof:: * Profiling an Ada Program with gprof::
@end ifclear @end ifclear
Running and Debugging Ada Programs Running and Debugging Ada Programs
...@@ -445,7 +442,7 @@ Running and Debugging Ada Programs ...@@ -445,7 +442,7 @@ Running and Debugging Ada Programs
* Ada Exceptions:: * Ada Exceptions::
* Ada Tasks:: * Ada Tasks::
* Debugging Generic Units:: * Debugging Generic Units::
* Remote Debugging using gdbserver:: * Remote Debugging with gdbserver::
* GNAT Abnormal Termination or Failure to Terminate:: * GNAT Abnormal Termination or Failure to Terminate::
* Naming Conventions for GNAT Source Files:: * Naming Conventions for GNAT Source Files::
* Getting Internal Debugging Information:: * Getting Internal Debugging Information::
...@@ -469,36 +466,6 @@ Compatibility with HP Ada ...@@ -469,36 +466,6 @@ Compatibility with HP Ada
* Input-Output:: * Input-Output::
* Implementation Limits:: * Implementation Limits::
* Tools and Utilities:: * Tools and Utilities::
Language-Related Features
* Integer Types and Representations::
* Floating-Point Types and Representations::
* Pragmas Float_Representation and Long_Float::
* Fixed-Point Types and Representations::
* Record and Array Component Alignment::
* Address Clauses::
* Other Representation Clauses::
Tasking and Task-Related Features
* Implementation of Tasks in HP Ada for OpenVMS Alpha Systems::
* Assigning Task IDs::
* Task IDs and Delays::
* Task-Related Pragmas::
* Scheduling and Task Priority::
* The Task Stack::
* External Interrupts::
Pragmas and Pragma-Related Features
* Restrictions on the Pragma INLINE::
* Restrictions on the Pragma INTERFACE::
* Restrictions on the Pragma SYSTEM_NAME::
Library of Predefined Units
* Changes to DECLIB::
Bindings
* Shared Libraries and Options Files::
* Interfaces to C::
@end ifset @end ifset
Platform-Specific Information for the Run-Time Libraries Platform-Specific Information for the Run-Time Libraries
...@@ -554,13 +521,13 @@ Compatibility and Porting Guide ...@@ -554,13 +521,13 @@ Compatibility and Porting Guide
* Compatibility with Ada 83:: * Compatibility with Ada 83::
* Compatibility between Ada 95 and Ada 2005:: * Compatibility between Ada 95 and Ada 2005::
* Implementation-dependent characteristics:: * Implementation-dependent characteristics::
* Compatibility with Other Ada Systems::
* Representation Clauses::
@ifclear vms @ifclear vms
@c This brief section is only in the non-VMS version @c This brief section is only in the non-VMS version
@c The complete chapter on HP Ada issues is in the VMS version @c The complete chapter on HP Ada issues is in the VMS version
* Compatibility with HP Ada 83:: * Compatibility with HP Ada 83::
@end ifclear @end ifclear
* Compatibility with Other Ada Systems::
* Representation Clauses::
@ifset vms @ifset vms
* Transitioning to 64-Bit GNAT for OpenVMS:: * Transitioning to 64-Bit GNAT for OpenVMS::
@end ifset @end ifset
...@@ -578,6 +545,7 @@ Microsoft Windows Topics ...@@ -578,6 +545,7 @@ Microsoft Windows Topics
* Introduction to Dynamic Link Libraries (DLLs):: * Introduction to Dynamic Link Libraries (DLLs)::
* Using DLLs with GNAT:: * Using DLLs with GNAT::
* Building DLLs with GNAT:: * Building DLLs with GNAT::
* Building DLLs with gnatdll::
* GNAT and Windows Resources:: * GNAT and Windows Resources::
* Debugging a DLL:: * Debugging a DLL::
* Setting Stack Size from gnatlink:: * Setting Stack Size from gnatlink::
...@@ -650,16 +618,16 @@ and running Ada programs with the GNAT Ada programming environment. ...@@ -650,16 +618,16 @@ and running Ada programs with the GNAT Ada programming environment.
by GNAT. by GNAT.
@item @item
@ref{Compiling With gcc}, describes how to compile @ref{Compiling with gcc}, describes how to compile
Ada programs with @command{gcc}, the Ada compiler. Ada programs with @command{gcc}, the Ada compiler.
@item @item
@ref{Binding With gnatbind}, describes how to @ref{Binding with gnatbind}, describes how to
perform binding of Ada programs with @code{gnatbind}, the GNAT binding perform binding of Ada programs with @code{gnatbind}, the GNAT binding
utility. utility.
@item @item
@ref{Linking With gnatlink}, @ref{Linking with gnatlink},
describes @command{gnatlink}, a describes @command{gnatlink}, a
program that provides for linking using the GNAT run-time library to program that provides for linking using the GNAT run-time library to
construct a program. @command{gnatlink} can also incorporate foreign language construct a program. @command{gnatlink} can also incorporate foreign language
...@@ -679,7 +647,7 @@ also describes the @command{gnatelim} tool and unused subprogram/data ...@@ -679,7 +647,7 @@ also describes the @command{gnatelim} tool and unused subprogram/data
elimination. elimination.
@item @item
@ref{Renaming Files Using gnatchop}, describes @ref{Renaming Files with gnatchop}, describes
@code{gnatchop}, a utility that allows you to preprocess a file that @code{gnatchop}, a utility that allows you to preprocess a file that
contains Ada source code, and split it into one or more new files, one contains Ada source code, and split it into one or more new files, one
for each compilation unit. for each compilation unit.
...@@ -689,7 +657,7 @@ for each compilation unit. ...@@ -689,7 +657,7 @@ for each compilation unit.
handled by GNAT. handled by GNAT.
@item @item
@ref{Handling Arbitrary File Naming Conventions Using gnatname}, @ref{Handling Arbitrary File Naming Conventions with gnatname},
shows how to override the default GNAT file naming conventions, shows how to override the default GNAT file naming conventions,
either for an individual unit or globally. either for an individual unit or globally.
...@@ -708,17 +676,17 @@ version of an Ada source file with control over casing, indentation, ...@@ -708,17 +676,17 @@ version of an Ada source file with control over casing, indentation,
comment placement, and other elements of program presentation style. comment placement, and other elements of program presentation style.
@item @item
@ref{The GNAT Metric Tool gnatmetric}, shows how to compute various @ref{The GNAT Metrics Tool gnatmetric}, shows how to compute various
metrics for an Ada source file, such as the number of types and subprograms, metrics for an Ada source file, such as the number of types and subprograms,
and assorted complexity measures. and assorted complexity measures.
@item @item
@ref{File Name Krunching Using gnatkr}, describes the @code{gnatkr} @ref{File Name Krunching with gnatkr}, describes the @code{gnatkr}
file name krunching utility, used to handle shortened file name krunching utility, used to handle shortened
file names on operating systems with a limit on the length of names. file names on operating systems with a limit on the length of names.
@item @item
@ref{Preprocessing Using gnatprep}, describes @code{gnatprep}, a @ref{Preprocessing with gnatprep}, describes @code{gnatprep}, a
preprocessor utility that allows a single source file to be used to preprocessor utility that allows a single source file to be used to
generate multiple or parameterized source files by means of macro generate multiple or parameterized source files by means of macro
substitution. substitution.
...@@ -729,7 +697,7 @@ utility that displays information about compiled units, including dependences ...@@ -729,7 +697,7 @@ utility that displays information about compiled units, including dependences
on the corresponding sources files, and consistency of compilations. on the corresponding sources files, and consistency of compilations.
@item @item
@ref{Cleaning Up Using gnatclean}, describes @code{gnatclean}, a utility @ref{Cleaning Up with gnatclean}, describes @code{gnatclean}, a utility
to delete files that are produced by the compiler, binder and linker. to delete files that are produced by the compiler, binder and linker.
@ifclear vms @ifclear vms
...@@ -757,15 +725,15 @@ allocation and deallocation and helps detect ``memory leaks''. ...@@ -757,15 +725,15 @@ allocation and deallocation and helps detect ``memory leaks''.
stack checking and analysis. stack checking and analysis.
@item @item
@ref{Verifying Properties Using gnatcheck}, discusses @code{gnatcheck}, @ref{Verifying Properties with gnatcheck}, discusses @code{gnatcheck},
a utility that checks Ada code against a set of rules. a utility that checks Ada code against a set of rules.
@item @item
@ref{Creating Sample Bodies Using gnatstub}, discusses @code{gnatstub}, @ref{Creating Sample Bodies with gnatstub}, discusses @code{gnatstub},
a utility that generates empty but compilable bodies for library units. a utility that generates empty but compilable bodies for library units.
@item @item
@ref{Creating Unit Tests Using gnattest}, discusses @code{gnattest}, @ref{Creating Unit Tests with gnattest}, discusses @code{gnattest},
a utility that generates unit testing templates for library units. a utility that generates unit testing templates for library units.
@item @item
...@@ -1056,7 +1024,7 @@ Alternatively, if you want to rename your files according to this default ...@@ -1056,7 +1024,7 @@ Alternatively, if you want to rename your files according to this default
convention, which is probably more convenient if you will be using GNAT convention, which is probably more convenient if you will be using GNAT
for all your compilations, then the @code{gnatchop} utility for all your compilations, then the @code{gnatchop} utility
can be used to generate correctly-named source files can be used to generate correctly-named source files
(@pxref{Renaming Files Using gnatchop}). (@pxref{Renaming Files with gnatchop}).
You can compile the program using the following command (@code{$} is used You can compile the program using the following command (@code{$} is used
as the command prompt in the examples in this document): as the command prompt in the examples in this document):
...@@ -1993,7 +1961,7 @@ can specify the exact file names that you want used, as described ...@@ -1993,7 +1961,7 @@ can specify the exact file names that you want used, as described
in the next section. Finally, if your Ada programs are migrating from a in the next section. Finally, if your Ada programs are migrating from a
compiler with a different naming convention, you can use the gnatchop compiler with a different naming convention, you can use the gnatchop
utility to produce source files that follow the GNAT naming conventions. utility to produce source files that follow the GNAT naming conventions.
(For details @pxref{Renaming Files Using gnatchop}.) (For details @pxref{Renaming Files with gnatchop}.)
Note: in the case of @code{Windows NT/XP} or @code{OpenVMS} operating Note: in the case of @code{Windows NT/XP} or @code{OpenVMS} operating
systems, case is not significant. So for example on @code{Windows XP} systems, case is not significant. So for example on @code{Windows XP}
...@@ -3725,8 +3693,8 @@ GNAT uses the current directory for temporary files. ...@@ -3725,8 +3693,8 @@ GNAT uses the current directory for temporary files.
@end ifset @end ifset
@c ************************* @c *************************
@node Compiling With gcc @node Compiling with gcc
@chapter Compiling With @command{gcc} @chapter Compiling with @command{gcc}
@noindent @noindent
This chapter discusses how to compile Ada programs using the @command{gcc} This chapter discusses how to compile Ada programs using the @command{gcc}
...@@ -7015,7 +6983,7 @@ on subprogram calls and generic instantiations. ...@@ -7015,7 +6983,7 @@ on subprogram calls and generic instantiations.
Note that @option{-gnatE} is not necessary for safety, because in the Note that @option{-gnatE} is not necessary for safety, because in the
default mode, GNAT ensures statically that the checks would not fail. default mode, GNAT ensures statically that the checks would not fail.
For full details of the effect and use of this switch, For full details of the effect and use of this switch,
@xref{Compiling With gcc}. @xref{Compiling with gcc}.
@item -fstack-check @item -fstack-check
@cindex @option{-fstack-check} (@command{gcc}) @cindex @option{-fstack-check} (@command{gcc})
...@@ -7084,7 +7052,7 @@ Normally, GNAT allows only a single unit in a source file. However, this ...@@ -7084,7 +7052,7 @@ Normally, GNAT allows only a single unit in a source file. However, this
restriction does not apply in syntax-check-only mode, and it is possible restriction does not apply in syntax-check-only mode, and it is possible
to check a file containing multiple compilation units concatenated to check a file containing multiple compilation units concatenated
together. This is primarily used by the @code{gnatchop} utility together. This is primarily used by the @code{gnatchop} utility
(@pxref{Renaming Files Using gnatchop}). (@pxref{Renaming Files with gnatchop}).
@end table @end table
@node Using gcc for Semantic Checking @node Using gcc for Semantic Checking
...@@ -7859,7 +7827,7 @@ preprocessing. ...@@ -7859,7 +7827,7 @@ preprocessing.
@noindent @noindent
The actual preprocessing function is described in details in section The actual preprocessing function is described in details in section
@ref{Preprocessing Using gnatprep}. This section only describes how integrated @ref{Preprocessing with gnatprep}. This section only describes how integrated
preprocessing is triggered and parameterized. preprocessing is triggered and parameterized.
@table @code @table @code
...@@ -8207,8 +8175,8 @@ Compile the subunit in file @file{abc-def.adb} in semantic-checking-only ...@@ -8207,8 +8175,8 @@ Compile the subunit in file @file{abc-def.adb} in semantic-checking-only
mode. mode.
@end table @end table
@node Binding With gnatbind @node Binding with gnatbind
@chapter Binding With @code{gnatbind} @chapter Binding with @code{gnatbind}
@findex gnatbind @findex gnatbind
@menu @menu
...@@ -9203,8 +9171,8 @@ since gnatlink will not be able to find the generated file. ...@@ -9203,8 +9171,8 @@ since gnatlink will not be able to find the generated file.
@end table @end table
@c ------------------------------------ @c ------------------------------------
@node Linking With gnatlink @node Linking with gnatlink
@chapter Linking With @command{gnatlink} @chapter Linking with @command{gnatlink}
@c ------------------------------------ @c ------------------------------------
@findex gnatlink @findex gnatlink
...@@ -11560,8 +11528,8 @@ It can be observed that the procedure @code{Unused} and the object ...@@ -11560,8 +11528,8 @@ It can be observed that the procedure @code{Unused} and the object
appropriate options. appropriate options.
@c ******************************** @c ********************************
@node Renaming Files Using gnatchop @node Renaming Files with gnatchop
@chapter Renaming Files Using @code{gnatchop} @chapter Renaming Files with @code{gnatchop}
@findex gnatchop @findex gnatchop
@noindent @noindent
...@@ -11918,6 +11886,11 @@ unit will be skipped. ...@@ -11918,6 +11886,11 @@ unit will be skipped.
@cindex Configuration pragmas @cindex Configuration pragmas
@cindex Pragmas, configuration @cindex Pragmas, configuration
@menu
* Handling of Configuration Pragmas::
* The Configuration Pragmas Files::
@end menu
@noindent @noindent
Configuration pragmas include those pragmas described as Configuration pragmas include those pragmas described as
such in the Ada Reference Manual, as well as such in the Ada Reference Manual, as well as
...@@ -11994,14 +11967,8 @@ recognized by GNAT: ...@@ -11994,14 +11967,8 @@ recognized by GNAT:
Validity_Checks Validity_Checks
Warnings Warnings
Wide_Character_Encoding Wide_Character_Encoding
@end smallexample @end smallexample
@menu
* Handling of Configuration Pragmas::
* The Configuration Pragmas Files::
@end menu
@node Handling of Configuration Pragmas @node Handling of Configuration Pragmas
@section Handling of Configuration Pragmas @section Handling of Configuration Pragmas
...@@ -12090,8 +12057,8 @@ predefined package SYSTEM all the additional types and subprograms that are ...@@ -12090,8 +12057,8 @@ predefined package SYSTEM all the additional types and subprograms that are
defined in HP Ada. See @ref{Compatibility with HP Ada} for details. defined in HP Ada. See @ref{Compatibility with HP Ada} for details.
@end ifset @end ifset
@node Handling Arbitrary File Naming Conventions Using gnatname @node Handling Arbitrary File Naming Conventions with gnatname
@chapter Handling Arbitrary File Naming Conventions Using @code{gnatname} @chapter Handling Arbitrary File Naming Conventions with @code{gnatname}
@cindex Arbitrary File Naming Conventions @cindex Arbitrary File Naming Conventions
@menu @menu
...@@ -13967,6 +13934,11 @@ point to any character in the middle of the identifier. ...@@ -13967,6 +13934,11 @@ point to any character in the middle of the identifier.
@findex gnatpp @findex gnatpp
@cindex Pretty-Printer @cindex Pretty-Printer
@menu
* Switches for gnatpp::
* Formatting Rules::
@end menu
@noindent @noindent
^The @command{gnatpp} tool^GNAT PRETTY^ is an ASIS-based utility ^The @command{gnatpp} tool^GNAT PRETTY^ is an ASIS-based utility
for source reformatting / pretty-printing. for source reformatting / pretty-printing.
...@@ -14027,11 +13999,6 @@ use the @option{-gnat05} switch if sources should be compiled in ...@@ -14027,11 +13999,6 @@ use the @option{-gnat05} switch if sources should be compiled in
Ada 2005 mode etc. Ada 2005 mode etc.
@end itemize @end itemize
@menu
* Switches for gnatpp::
* Formatting Rules::
@end menu
@node Switches for gnatpp @node Switches for gnatpp
@section Switches for @command{gnatpp} @section Switches for @command{gnatpp}
...@@ -15137,8 +15104,8 @@ end Test; ...@@ -15137,8 +15104,8 @@ end Test;
@end smallexample @end smallexample
@c ********************************* @c *********************************
@node The GNAT Metric Tool gnatmetric @node The GNAT Metrics Tool gnatmetric
@chapter The GNAT Metric Tool @command{gnatmetric} @chapter The GNAT Metrics Tool @command{gnatmetric}
@findex gnatmetric @findex gnatmetric
@cindex Metric tool @cindex Metric tool
...@@ -15149,6 +15116,10 @@ It takes an Ada source file as input and generates a file containing the ...@@ -15149,6 +15116,10 @@ It takes an Ada source file as input and generates a file containing the
metrics data as output. Various switches control which metrics data as output. Various switches control which
metrics are computed and output. metrics are computed and output.
@menu
* Switches for gnatmetric::
@end menu
@command{gnatmetric} generates and uses the ASIS @command{gnatmetric} generates and uses the ASIS
tree for the input source and thus requires the input to be syntactically and tree for the input source and thus requires the input to be syntactically and
semantically legal. semantically legal.
...@@ -15201,10 +15172,6 @@ use the @option{-gnat05} switch if sources should be compiled in ...@@ -15201,10 +15172,6 @@ use the @option{-gnat05} switch if sources should be compiled in
Ada 2005 mode etc. Ada 2005 mode etc.
@end itemize @end itemize
@menu
* Switches for gnatmetric::
@end menu
@node Switches for gnatmetric @node Switches for gnatmetric
@section Switches for @command{gnatmetric} @section Switches for @command{gnatmetric}
...@@ -16076,8 +16043,8 @@ the @option{-U} option followed by the name of the main unit: ...@@ -16076,8 +16043,8 @@ the @option{-U} option followed by the name of the main unit:
@c *********************************** @c ***********************************
@node File Name Krunching Using gnatkr @node File Name Krunching with gnatkr
@chapter File Name Krunching Using @code{gnatkr} @chapter File Name Krunching with @code{gnatkr}
@findex gnatkr @findex gnatkr
@noindent @noindent
...@@ -16292,8 +16259,8 @@ $ gnatkr very_long_unit_name.ads/count=6 --> vlunna.ads ...@@ -16292,8 +16259,8 @@ $ gnatkr very_long_unit_name.ads/count=6 --> vlunna.ads
$ gnatkr very_long_unit_name.ads/count=0 --> very_long_unit_name.ads $ gnatkr very_long_unit_name.ads/count=0 --> very_long_unit_name.ads
@end smallexample @end smallexample
@node Preprocessing Using gnatprep @node Preprocessing with gnatprep
@chapter Preprocessing Using @code{gnatprep} @chapter Preprocessing with @code{gnatprep}
@findex gnatprep @findex gnatprep
@noindent @noindent
...@@ -16889,8 +16856,8 @@ GNU:[LIB.OPENVMS7_1.2_8_1.ADALIB]unchconv.ads ...@@ -16889,8 +16856,8 @@ GNU:[LIB.OPENVMS7_1.2_8_1.ADALIB]unchconv.ads
@end smallexample @end smallexample
@end ifset @end ifset
@node Cleaning Up Using gnatclean @node Cleaning Up with gnatclean
@chapter Cleaning Up Using @code{gnatclean} @chapter Cleaning Up with @code{gnatclean}
@findex gnatclean @findex gnatclean
@cindex Cleaning tool @cindex Cleaning tool
...@@ -18743,8 +18710,8 @@ stack usage reports at run-time. See its body for the details. ...@@ -18743,8 +18710,8 @@ stack usage reports at run-time. See its body for the details.
@c ********************************* @c *********************************
@c * GNATCHECK * @c * GNATCHECK *
@c ********************************* @c *********************************
@node Verifying Properties Using gnatcheck @node Verifying Properties with gnatcheck
@chapter Verifying Properties Using @command{gnatcheck} @chapter Verifying Properties with @command{gnatcheck}
@findex gnatcheck @findex gnatcheck
@cindex @command{gnatcheck} @cindex @command{gnatcheck}
...@@ -18765,8 +18732,8 @@ For full details, refer to @cite{GNATcheck Reference Manual} document. ...@@ -18765,8 +18732,8 @@ For full details, refer to @cite{GNATcheck Reference Manual} document.
@c ********************************* @c *********************************
@node Creating Sample Bodies Using gnatstub @node Creating Sample Bodies with gnatstub
@chapter Creating Sample Bodies Using @command{gnatstub} @chapter Creating Sample Bodies with @command{gnatstub}
@findex gnatstub @findex gnatstub
@noindent @noindent
...@@ -18974,8 +18941,8 @@ Verbose mode: generate version information. ...@@ -18974,8 +18941,8 @@ Verbose mode: generate version information.
@end table @end table
@c ********************************* @c *********************************
@node Creating Unit Tests Using gnattest @node Creating Unit Tests with gnattest
@chapter Creating Unit Tests Using @command{gnattest} @chapter Creating Unit Tests with @command{gnattest}
@findex gnattest @findex gnattest
@noindent @noindent
...@@ -20269,12 +20236,12 @@ This chapter describes how to use @code{gcov} - coverage testing tool - and ...@@ -20269,12 +20236,12 @@ This chapter describes how to use @code{gcov} - coverage testing tool - and
@code{gprof} - profiler tool - on your Ada programs. @code{gprof} - profiler tool - on your Ada programs.
@menu @menu
* Code Coverage of Ada Programs using gcov:: * Code Coverage of Ada Programs with gcov::
* Profiling an Ada Program using gprof:: * Profiling an Ada Program with gprof::
@end menu @end menu
@node Code Coverage of Ada Programs using gcov @node Code Coverage of Ada Programs with gcov
@section Code Coverage of Ada Programs using gcov @section Code Coverage of Ada Programs with gcov
@cindex gcov @cindex gcov
@cindex -fprofile-arcs @cindex -fprofile-arcs
@cindex -ftest-coverage @cindex -ftest-coverage
...@@ -20361,8 +20328,8 @@ text file, and provide this file to gcov as a parameter, preceded by a @@ ...@@ -20361,8 +20328,8 @@ text file, and provide this file to gcov as a parameter, preceded by a @@
Note that on AIX compiling a static library with @code{-fprofile-arcs} is Note that on AIX compiling a static library with @code{-fprofile-arcs} is
not supported as there can be unresolved symbols during the final link. not supported as there can be unresolved symbols during the final link.
@node Profiling an Ada Program using gprof @node Profiling an Ada Program with gprof
@section Profiling an Ada Program using gprof @section Profiling an Ada Program with gprof
@cindex gprof @cindex gprof
@cindex -pg @cindex -pg
@cindex Profiling @cindex Profiling
...@@ -20587,7 +20554,7 @@ the incorrect user program. ...@@ -20587,7 +20554,7 @@ the incorrect user program.
* Ada Exceptions:: * Ada Exceptions::
* Ada Tasks:: * Ada Tasks::
* Debugging Generic Units:: * Debugging Generic Units::
* Remote Debugging using gdbserver:: * Remote Debugging with gdbserver::
* GNAT Abnormal Termination or Failure to Terminate:: * GNAT Abnormal Termination or Failure to Terminate::
* Naming Conventions for GNAT Source Files:: * Naming Conventions for GNAT Source Files::
* Getting Internal Debugging Information:: * Getting Internal Debugging Information::
...@@ -21045,9 +21012,9 @@ When the breakpoint occurs, you can step through the code of the ...@@ -21045,9 +21012,9 @@ When the breakpoint occurs, you can step through the code of the
instance in the normal manner and examine the values of local variables, as for instance in the normal manner and examine the values of local variables, as for
other units. other units.
@node Remote Debugging using gdbserver @node Remote Debugging with gdbserver
@section Remote Debugging using gdbserver @section Remote Debugging with gdbserver
@cindex Remote Debugging using gdbserver @cindex Remote Debugging with gdbserver
@noindent @noindent
On platforms where gdbserver is supported, it is possible to use this tool On platforms where gdbserver is supported, it is possible to use this tool
...@@ -27238,7 +27205,7 @@ The preprocessor may be used in two separate modes. It can be used quite ...@@ -27238,7 +27205,7 @@ The preprocessor may be used in two separate modes. It can be used quite
separately from the compiler, to generate a separate output source file separately from the compiler, to generate a separate output source file
that is then fed to the compiler as a separate step. This is the that is then fed to the compiler as a separate step. This is the
@code{gnatprep} utility, whose use is fully described in @code{gnatprep} utility, whose use is fully described in
@ref{Preprocessing Using gnatprep}. @ref{Preprocessing with gnatprep}.
@cindex @code{gnatprep} @cindex @code{gnatprep}
The preprocessing language allows such constructs as The preprocessing language allows such constructs as
...@@ -29656,12 +29623,6 @@ end API; ...@@ -29656,12 +29623,6 @@ end API;
@end group @end group
@end smallexample @end smallexample
@noindent
Note that a variable is
@strong{always imported with a DLL convention}. A function
can have @code{C} or @code{Stdcall} convention.
(@pxref{Windows Calling Conventions}).
@node Creating an Import Library @node Creating an Import Library
@subsection Creating an Import Library @subsection Creating an Import Library
@cindex Import library @cindex Import library
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2000-2012, Free Software Foundation, Inc. -- -- Copyright (C) 2000-2013, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -380,7 +380,14 @@ package body Impunit is ...@@ -380,7 +380,14 @@ package body Impunit is
("s-ststop", F), -- System.Strings.Stream_Ops ("s-ststop", F), -- System.Strings.Stream_Ops
("s-tasinf", F), -- System.Task_Info ("s-tasinf", F), -- System.Task_Info
("s-wchcnv", F), -- System.Wch_Cnv ("s-wchcnv", F), -- System.Wch_Cnv
("s-wchcon", F)); -- System.Wch_Con ("s-wchcon", F), -- System.Wch_Con
-- The following are strictly speaking Ada 2012 units, but we are allowed
-- to add children to system, so we consider them to be implementation
-- defined additions to System in earlier versions of Ada.
("s-multip", T), -- System.Multiprocessors
("s-mudido", T)); -- System.Multiprocessors.Dispatching_Domains
-------------------- --------------------
-- Ada 2005 Units -- -- Ada 2005 Units --
...@@ -544,8 +551,6 @@ package body Impunit is ...@@ -544,8 +551,6 @@ package body Impunit is
-- The following units should be used only in Ada 2012 mode -- The following units should be used only in Ada 2012 mode
Non_Imp_File_Names_12 : constant File_List := ( Non_Imp_File_Names_12 : constant File_List := (
("s-multip", T), -- System.Multiprocessors
("s-mudido", T), -- System.Multiprocessors.Dispatching_Domains
("s-stposu", T), -- System.Storage_Pools.Subpools ("s-stposu", T), -- System.Storage_Pools.Subpools
("a-cobove", T), -- Ada.Containers.Bounded_Vectors ("a-cobove", T), -- Ada.Containers.Bounded_Vectors
("a-cbdlli", T), -- Ada.Containers.Bounded_Doubly_Linked_Lists ("a-cbdlli", T), -- Ada.Containers.Bounded_Doubly_Linked_Lists
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -138,6 +138,7 @@ package body Ch7 is ...@@ -138,6 +138,7 @@ package body Ch7 is
end if; end if;
T_Body; T_Body;
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Name_Node := P_Defining_Program_Unit_Name; Name_Node := P_Defining_Program_Unit_Name;
Scope.Table (Scope.Last).Labl := Name_Node; Scope.Table (Scope.Last).Labl := Name_Node;
TF_Is; TF_Is;
...@@ -182,6 +183,7 @@ package body Ch7 is ...@@ -182,6 +183,7 @@ package body Ch7 is
-- Cases other than Package_Body -- Cases other than Package_Body
else else
Scope.Table (Scope.Last).Sloc := Token_Ptr;
Name_Node := P_Defining_Program_Unit_Name; Name_Node := P_Defining_Program_Unit_Name;
Scope.Table (Scope.Last).Labl := Name_Node; Scope.Table (Scope.Last).Labl := Name_Node;
......
...@@ -3456,8 +3456,12 @@ package body Sem_Prag is ...@@ -3456,8 +3456,12 @@ package body Sem_Prag is
end if; end if;
-- Give message if needed if we fall through those tests -- Give message if needed if we fall through those tests
-- except on Relaxed_RM_Semantics where we let go: either this
-- is a case accepted/ignored by other Ada compilers (e.g.
-- a mix of Convention and Import), or another error will be
-- generated later (e.g. using both Import and Export).
if Err then if Err and not Relaxed_RM_Semantics then
Error_Pragma_Arg Error_Pragma_Arg
("at most one Convention/Export/Import pragma is allowed", ("at most one Convention/Export/Import pragma is allowed",
Arg2); Arg2);
......
...@@ -487,18 +487,26 @@ begin ...@@ -487,18 +487,26 @@ begin
pragma Import (C, save_argv); pragma Import (C, save_argv);
-- Saved value of argv (argument pointers), imported from misc.c -- Saved value of argv (argument pointers), imported from misc.c
function Len_Arg (Arg : Pos) return Nat; gnat_argc : Nat;
-- Determine length of argument number Arg on original gnat1 command gnat_argv : Arg_Array_Ptr;
-- line. pragma Import (C, gnat_argc);
pragma Import (C, gnat_argv);
-- If save_argv is not set, default to gnat_argc/argv
argc : Nat;
argv : Arg_Array_Ptr;
function Len_Arg (Arg : Big_String_Ptr) return Nat;
-- Determine length of argument Arg (a nul terminated C string).
------------- -------------
-- Len_Arg -- -- Len_Arg --
------------- -------------
function Len_Arg (Arg : Pos) return Nat is function Len_Arg (Arg : Big_String_Ptr) return Nat is
begin begin
for J in 1 .. Nat'Last loop for J in 1 .. Nat'Last loop
if save_argv (Arg).all (Natural (J)) = ASCII.NUL then if Arg (Natural (J)) = ASCII.NUL then
return J - 1; return J - 1;
end if; end if;
end loop; end loop;
...@@ -507,12 +515,21 @@ begin ...@@ -507,12 +515,21 @@ begin
end Len_Arg; end Len_Arg;
begin begin
if save_argv /= null then
argv := save_argv;
argc := save_argc;
else
-- Case of a non gcc compiler, e.g. gnat2why or gnat2scil
argv := gnat_argv;
argc := gnat_argc;
end if;
-- Loop through arguments looking for -gnateT, also look for -gnatd.b -- Loop through arguments looking for -gnateT, also look for -gnatd.b
for Arg in 1 .. save_argc - 1 loop for Arg in 1 .. argc - 1 loop
declare declare
Argv_Ptr : constant Big_String_Ptr := save_argv (Arg); Argv_Ptr : constant Big_String_Ptr := argv (Arg);
Argv_Len : constant Nat := Len_Arg (Arg); Argv_Len : constant Nat := Len_Arg (Argv_Ptr);
begin begin
if Argv_Len > 8 if Argv_Len > 8
......
...@@ -652,8 +652,7 @@ package body Switch.C is ...@@ -652,8 +652,7 @@ package body Switch.C is
when 't' => when 't' =>
if not First_Switch then if not First_Switch then
Osint.Fail Osint.Fail
("-gnatet must be first if combined with " ("-gnatet must not be combined with other switches");
& "other switches");
end if; end if;
-- Check for '=' -- Check for '='
...@@ -674,8 +673,7 @@ package body Switch.C is ...@@ -674,8 +673,7 @@ package body Switch.C is
when 'T' => when 'T' =>
if not First_Switch then if not First_Switch then
Osint.Fail Osint.Fail
("-gnateT must be first if combined with " ("-gnateT must not be combined with other switches");
& "other switches");
end if; end if;
-- Check for '=' -- Check for '='
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment