[multiple changes]

2014-02-24  Ed Schonberg  <schonberg@adacore.com>

	* s-dimmks.ads: Replace symbol for temperature, previously the
	Greek letter Theta, by the ASCII @ sign.
	* s-diflio.ads: ditto.

2014-02-24  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Minor code reorganization (use OR for boolean
	variables).
	* sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.

2014-02-24  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi, projects.texi: Added the necessary conditionalization
	so that references to gnatmem and ASIS tools do not appear in the FSF
	edition of the GNAT User's Guide.

From-SVN: r208071
This commit is contained in:
Arnaud Charlet 2014-02-24 16:49:39 +01:00
parent ebb6b0bd98
commit 1037b0f462
9 changed files with 164 additions and 26 deletions

View File

@ -1,3 +1,21 @@
2014-02-24 Ed Schonberg <schonberg@adacore.com>
* s-dimmks.ads: Replace symbol for temperature, previously the
Greek letter Theta, by the ASCII @ sign.
* s-diflio.ads: ditto.
2014-02-24 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor code reorganization (use OR for boolean
variables).
* sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
2014-02-24 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi, projects.texi: Added the necessary conditionalization
so that references to gnatmem and ASIS tools do not appear in the FSF
edition of the GNAT User's Guide.
2014-02-24 Yannick Moy <moy@adacore.com>
* freeze.adb (Freeze_Entity): Do not issue warning

View File

@ -7615,7 +7615,7 @@ package body Exp_Ch4 is
-- arithmetic instructions check overflow automatically, so only
-- one version of the exponentiation unit is needed.
if Ovflo or else AAMP_On_Target then
if Ovflo or AAMP_On_Target then
Rent := RE_Exp_Long_Long_Integer;
else
Rent := RE_Exn_Long_Long_Integer;
@ -7628,7 +7628,7 @@ package body Exp_Ch4 is
-- arithmetic instructions check overflow automatically, so only
-- one version of the exponentiation unit is needed.
if Ovflo or else AAMP_On_Target then
if Ovflo or AAMP_On_Target then
Rent := RE_Exp_Integer;
else
Rent := RE_Exn_Integer;

View File

@ -3871,9 +3871,9 @@ package body Freeze is
-- Pre/post conditions are implemented through a subprogram
-- in the corresponding body, and therefore are not checked on
-- an imported subprogram for which the body is not available.
-- This warning is not issued in GNATprove mode, as these
-- contracts are handled in formal verification, so the
-- warning would be misleading in that case.
-- This warning is not issued in GNATprove mode, as all these
-- contracts are handled in formal verification, so the warning
-- would be misleading in that case.
-- Could consider generating a wrapper to take care of this???
@ -3887,7 +3887,6 @@ package body Freeze is
("pre/post conditions on imported subprogram are not "
& "enforced??", E, Pre_Post_Conditions (Contract (E)));
end if;
end if;
-- Must freeze its parent first if it is a derived subprogram

View File

@ -178,11 +178,13 @@ AdaCore@*
* GNAT Project Manager::
* Tools Supporting Project Files::
* The Cross-Referencing Tools gnatxref and gnatfind::
@ifclear FSFEDITION
* The GNAT Pretty-Printer gnatpp::
@ifclear vms
* The Ada-to-XML converter gnat2xml::
@end ifclear
* The GNAT Metrics Tool gnatmetric::
@end ifclear
* File Name Krunching with gnatkr::
* Preprocessing with gnatprep::
* The GNAT Library Browser gnatls::
@ -193,9 +195,11 @@ AdaCore@*
@end ifclear
* Memory Management Issues::
* Stack Related Facilities::
@ifclear FSFEDITION
* Verifying Properties with gnatcheck::
* Creating Sample Bodies with gnatstub::
* Creating Unit Tests with gnattest::
@end ifclear
* Performing Dimensionality Analysis in GNAT::
* Generating Ada Bindings for C and C++ headers::
* Other Utility Programs::
@ -297,10 +301,13 @@ binding and link.
@item
@ref{Improving Performance}, shows various techniques for making your
Ada program run faster or take less space.
It discusses the effect of the compiler's optimization switch and
also describes the @command{gnatelim} tool and unused subprogram/data
elimination.
Ada program run faster or take less space and describes the effect of
the compiler's optimization switch.
It also describes
@ifclear FSFEDITION
the @command{gnatelim} tool and
@end ifclear
unused subprogram/data elimination.
@item
@ref{Renaming Files with gnatchop}, describes
@ -326,21 +333,27 @@ to organize large projects.
@code{gnatxref} and @code{gnatfind}, two tools that provide an easy
way to navigate through sources.
@ifclear FSFEDITION
@item
@ref{The GNAT Pretty-Printer gnatpp}, shows how to produce a reformatted
version of an Ada source file with control over casing, indentation,
comment placement, and other elements of program presentation style.
@end ifclear
@ifclear FSFEDITION
@ifclear vms
@item
@ref{The Ada-to-XML converter gnat2xml}, shows how to convert Ada
source code into XML.
@end ifclear
@end ifclear
@ifclear FSFEDITION
@item
@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,
and assorted complexity measures.
@end ifclear
@item
@ref{File Name Krunching with gnatkr}, describes the @code{gnatkr}
@ -378,14 +391,17 @@ the GNAT toolset in Makefiles.
and in particular the GNAT Debug Pool facility, which helps detect incorrect
memory references.
@ifclear vms
@ifclear FSFEDITION
It also describes @command{gnatmem}, a utility that monitors dynamic
allocation and deallocation and helps detect ``memory leaks''.
@end ifclear
@end ifclear
@item
@ref{Stack Related Facilities}, describes some useful tools associated with
stack checking and analysis.
@ifclear FSFEDITION
@item
@ref{Verifying Properties with gnatcheck}, discusses @code{gnatcheck},
a utility that checks Ada code against a set of rules.
@ -393,10 +409,13 @@ a utility that checks Ada code against a set of rules.
@item
@ref{Creating Sample Bodies with gnatstub}, discusses @code{gnatstub},
a utility that generates empty but compilable bodies for library units.
@end ifclear
@ifclear FSFEDITION
@item
@ref{Creating Unit Tests with gnattest}, discusses @code{gnattest},
a utility that generates unit testing templates for library units.
@end ifclear
@item
@ref{Performing Dimensionality Analysis in GNAT}, describes the Ada 2012
@ -6211,11 +6230,14 @@ checking arbitrary coding standards. It is simply an embedding of the
style rules we have chosen for the GNAT sources. If you are starting
a project which does not have established style standards, you may
find it useful to adopt the entire set of GNAT coding standards, or
some subset of them. If you already have an established set of coding
standards, then it may be that selected style checking options do
some subset of them.
@ifclear FSFEDITION
If you already have an established set of coding
standards, then the selected style checking options may
indeed correspond to choices you have made, but for general checking
of an existing set of coding rules, you should look to the gnatcheck
tool, which is designed for that purpose.
@end ifclear
@ifset vms
@code{(option,option,@dots{})} is a sequence of keywords
@ -10128,14 +10150,20 @@ displaying commands it is executing.
This chapter presents several topics related to program performance.
It first describes some of the tradeoffs that need to be considered
and some of the techniques for making your program run faster.
It then documents the @command{gnatelim} tool and unused subprogram/data
It then documents
@ifclear FSFEDITION
the @command{gnatelim} tool and
@end ifclear
unused subprogram/data
elimination feature, which can reduce the size of program executables.
@ifnottex
@menu
* Performance Considerations::
* Text_IO Suggestions::
@ifclear FSFEDITION
* Reducing Size of Ada Executables with gnatelim::
@end ifclear
* Reducing Size of Executables with unused subprogram/data elimination::
@end menu
@end ifnottex
@ -11189,7 +11217,7 @@ of the standard output file, or change the standard output file to
be buffered using @code{Interfaces.C_Streams.setvbuf}.
@ifclear FSFEDITION
@node Reducing Size of Ada Executables with gnatelim
@section Reducing Size of Ada Executables with @code{gnatelim}
@findex gnatelim
@ -11454,6 +11482,7 @@ $ gnatmake ^-f main_prog^/FORCE_COMPILE MAIN_PROG^
@end smallexample
@end enumerate
@end ifclear
@node Reducing Size of Executables with unused subprogram/data elimination
@section Reducing Size of Executables with Unused Subprogram/Data Elimination
@ -12959,15 +12988,21 @@ When a library project file is specified, switches ^-b^/ACTION=BIND^ and
A number of GNAT tools, other than @command{^gnatmake^gnatmake^}
can benefit from project files:
(@command{^gnatbind^gnatbind^},
@ifclear FSFEDITION
@command{^gnatcheck^gnatcheck^},
@end ifclear
@command{^gnatclean^gnatclean^},
@ifclear FSFEDITION
@command{^gnatelim^gnatelim^},
@end ifclear
@command{^gnatfind^gnatfind^},
@command{^gnatlink^gnatlink^},
@command{^gnatls^gnatls^},
@ifclear FSFEDITION
@command{^gnatmetric^gnatmetric^},
@command{^gnatpp^gnatpp^},
@command{^gnatstub^gnatstub^},
@end ifclear
and @command{^gnatxref^gnatxref^}). However, none of these tools can be invoked
directly with a project file switch (@option{^-P^/PROJECT_FILE=^}).
They must be invoked through the @command{gnat} driver.
@ -12985,7 +13020,9 @@ On non-VMS platforms, the @command{gnat} driver accepts the following commands
@item CHOP to invoke @command{^gnatchop^gnatchop^}
@item CLEAN to invoke @command{^gnatclean^gnatclean^}
@item COMP or COMPILE to invoke the compiler
@ifclear FSFEDITION
@item ELIM to invoke @command{^gnatelim^gnatelim^}
@end ifclear
@item FIND to invoke @command{^gnatfind^gnatfind^}
@item KR or KRUNCH to invoke @command{^gnatkr^gnatkr^}
@item LINK to invoke @command{^gnatlink^gnatlink^}
@ -12993,9 +13030,11 @@ On non-VMS platforms, the @command{gnat} driver accepts the following commands
@item MAKE to invoke @command{^gnatmake^gnatmake^}
@item NAME to invoke @command{^gnatname^gnatname^}
@item PREP or PREPROCESS to invoke @command{^gnatprep^gnatprep^}
@ifclear FSFEDITION
@item PP or PRETTY to invoke @command{^gnatpp^gnatpp^}
@item METRIC to invoke @command{^gnatmetric^gnatmetric^}
@item STUB to invoke @command{^gnatstub^gnatstub^}
@end ifclear
@item XREF to invoke @command{^gnatxref^gnatxref^}
@end itemize
@ -13034,23 +13073,37 @@ files may be specified with their path name preceded by '@@'.
@end smallexample
@noindent
In addition, for commands BIND, COMP or COMPILE, FIND, ELIM, LS or LIST, LINK,
METRIC, PP or PRETTY, STUB and XREF, the project file related switches
In addition, for commands BIND, COMP or COMPILE, FIND,
@ifclear FSFEDITION
ELIM,
@end ifclear
LS or LIST, LINK,
@ifclear FSFEDITION
METRIC,
PP or PRETTY,
STUB,
@end ifclear
and XREF, the project file related switches
(@option{^-P^/PROJECT_FILE^},
@option{^-X^/EXTERNAL_REFERENCE^} and
@option{^-vP^/MESSAGES_PROJECT_FILE=^x}) may be used in addition to
the switches of the invoking tool.
@ifclear FSFEDITION
When GNAT PP or GNAT PRETTY is used with a project file, but with no source
specified on the command line, it invokes @command{^gnatpp^gnatpp^} with all
the immediate sources of the specified project file.
@end ifclear
@ifclear FSFEDITION
When GNAT METRIC is used with a project file, but with no source
specified on the command line, it invokes @command{^gnatmetric^gnatmetric^}
with all the immediate sources of the specified project file and with
@option{^-d^/DIRECTORY^} with the parameter pointing to the object directory
of the project.
@end ifclear
@ifclear FSFEDITION
In addition, when GNAT PP, GNAT PRETTY or GNAT METRIC is used with
a project file, no source is specified on the command line and
switch ^-U^/ALL_PROJECTS^ is specified on the command line, then
@ -13060,6 +13113,7 @@ not only for the immediate sources of the main project.
@ifclear vms
(-U stands for Universal or Union of the project files of the project tree)
@end ifclear
@end ifclear
For each of the following commands, there is optionally a corresponding
package in the main project.
@ -13067,34 +13121,46 @@ package in the main project.
@itemize @bullet
@item package @code{Binder} for command BIND (invoking @code{^gnatbind^gnatbind^})
@ifclear FSFEDITION
@item package @code{Check} for command CHECK (invoking
@code{^gnatcheck^gnatcheck^})
@end ifclear
@item package @code{Compiler} for command COMP or COMPILE (invoking the compiler)
@item package @code{Cross_Reference} for command XREF (invoking
@code{^gnatxref^gnatxref^})
@ifclear FSFEDITION
@item package @code{Eliminate} for command ELIM (invoking
@code{^gnatelim^gnatelim^})
@end ifclear
@item package @code{Finder} for command FIND (invoking @code{^gnatfind^gnatfind^})
@item package @code{Gnatls} for command LS or LIST (invoking @code{^gnatls^gnatls^})
@ifclear FSFEDITION
@item package @code{Gnatstub} for command STUB
(invoking @code{^gnatstub^gnatstub^})
@end ifclear
@item package @code{Linker} for command LINK (invoking @code{^gnatlink^gnatlink^})
@ifclear FSFEDITION
@item package @code{Check} for command CHECK
(invoking @code{^gnatcheck^gnatcheck^})
@end ifclear
@ifclear FSFEDITION
@item package @code{Metrics} for command METRIC
(invoking @code{^gnatmetric^gnatmetric^})
@end ifclear
@ifclear FSFEDITION
@item package @code{Pretty_Printer} for command PP or PRETTY
(invoking @code{^gnatpp^gnatpp^})
@end ifclear
@end itemize
@ -13208,6 +13274,7 @@ found in the package corresponding to the tool:
@code{^Default_Switches^Default_Switches^ ("Ada")} for all tools,
except @code{Switches ("main.adb")}
for @code{^gnatlink^gnatlink^}.
@ifclear FSFEDITION
It is also possible to invoke some of the tools,
(@code{^gnatcheck^gnatcheck^},
@code{^gnatmetric^gnatmetric^},
@ -13240,6 +13307,7 @@ on @command{gnatbind}'s option @option{-R}. But if the argument files for the
tool invoked by the @command{gnat} driver are explicitly specified
either directly or through the tool @option{-files} option, then the tool
is called only for these explicitly specified files.
@end ifclear
@c *****************************************
@c * Cross-referencing tools
@ -13983,6 +14051,7 @@ point to any character in the middle of the identifier.
@end table
@ifclear FSFEDITION
@c *********************************
@node The GNAT Pretty-Printer gnatpp
@chapter The GNAT Pretty-Printer @command{gnatpp}
@ -15310,7 +15379,9 @@ begin
end Test;
@end cartouche
@end smallexample
@end ifclear
@ifclear FSFEDITION
@ifclear vms
@c *********************************
@node The Ada-to-XML converter gnat2xml
@ -15807,7 +15878,10 @@ formal_package
formal_package_declaration_with_box
@end smallexample
@end ifclear
@end ifclear
@ifclear FSFEDITION
@c *********************************
@node The GNAT Metrics Tool gnatmetric
@chapter The GNAT Metrics Tool @command{gnatmetric}
@ -16019,7 +16093,7 @@ Suppression of metrics computation for eligible local units can be
obtained via the following switch:
@table @option
@cindex @option{^-n@var{x}^/SUPPRESS^} (@command{gnatmetric})
@cindex @option{^-nolocal^/SUPPRESS^} (@command{gnatmetric})
@item ^-nolocal^/SUPPRESS=LOCAL_DETAILS^
Do not compute detailed metrics for eligible local program units
@ -16823,6 +16897,7 @@ the @option{-U} option followed by the name of the main unit:
gnat metric -Pproj -U main
@end smallexample
@end ignore
@end ifclear
@c ***********************************
@ -18724,16 +18799,20 @@ This chapter describes some useful memory pools provided in the GNAT library
and in particular the GNAT Debug Pool facility, which can be used to detect
incorrect uses of access values (including ``dangling references'').
@ifclear vms
@ifclear FSFEDITION
It also describes the @command{gnatmem} tool, which can be used to track down
``memory leaks''.
@end ifclear
@end ifclear
@menu
* Some Useful Memory Pools::
* The GNAT Debug Pool Facility::
@ifclear vms
@ifclear FSFEDITION
* The gnatmem Tool::
@end ifclear
@end ifclear
@end menu
@node Some Useful Memory Pools
@ -18947,6 +19026,7 @@ Debug Pool info:
@end smallexample
@ifclear vms
@ifclear FSFEDITION
@node The gnatmem Tool
@section The @command{gnatmem} Tool
@findex gnatmem
@ -19298,7 +19378,7 @@ Allocation Root # 4
@noindent
The allocation root #1 of the first example has been split in 2 roots #1
and #3 thanks to the more precise associated backtrace.
@end ifclear
@end ifclear
@node Stack Related Facilities
@ -19506,6 +19586,7 @@ only processed when the environment variable GNAT_STACK_LIMIT is set.
The package @code{GNAT.Task_Stack_Usage} provides facilities to get
stack usage reports at run-time. See its body for the details.
@ifclear FSFEDITION
@c *********************************
@c * GNATCHECK *
@c *********************************
@ -19528,8 +19609,9 @@ calling @command{gnatcheck}, either through a specified project file or
through @command{gnatcheck} switches.
For full details, refer to @cite{GNATcheck Reference Manual} document.
@end ifclear
@ifclear FSFEDITION
@c *********************************
@node Creating Sample Bodies with gnatstub
@chapter Creating Sample Bodies with @command{gnatstub}
@ -19757,7 +19839,9 @@ unless this option is set.
Verbose mode: generate version information.
@end table
@end ifclear
@ifclear FSFEDITION
@c *********************************
@node Creating Unit Tests with gnattest
@chapter Creating Unit Tests with @command{gnattest}
@ -20374,6 +20458,8 @@ The tool currently does not support following features:
@item tests for protected subprograms and entries
@end itemize
@end ifclear
@c *********************************
@node Performing Dimensionality Analysis in GNAT

View File

@ -3166,6 +3166,7 @@ The following packages are currently supported in project files
but there are some general options that should be defined in this
package. @xref{Main Subprograms}, and @pxref{Executable File Names} in
particular.
@ifclear FSFEDITION
@item Check
This package specifies the options used when calling the checking tool
@command{gnatcheck} via the @command{gnat} driver. Its attribute
@ -3173,6 +3174,7 @@ The following packages are currently supported in project files
@code{Builder}. The first string should always be @code{-rules} to specify
that all the other options belong to the @code{-rules} section of the
parameters to @command{gnatcheck}.
@end ifclear
@item Clean
This package specifies the options used when cleaning a project or a project
tree using the tools @command{gnatclean} or @command{gprclean}.
@ -3184,11 +3186,13 @@ The following packages are currently supported in project files
@command{gnatxref} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}.
@ifclear FSFEDITION
@item Eliminate
This package specifies the options used when calling the tool
@command{gnatelim} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}.
@end ifclear
@item Finder
This package specifies the options used when calling the search tool
@command{gnatfind} via the @command{gnat} driver. Its attributes
@ -3197,11 +3201,13 @@ The following packages are currently supported in project files
@item ^Gnatls^Gnatls^
This package specifies the options to use when invoking @command{gnatls}
via the @command{gnat} driver.
@ifclear FSFEDITION
@item ^Gnatstub^Gnatstub^
This package specifies the options used when calling the tool
@command{gnatstub} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}.
@end ifclear
@item IDE
This package specifies the options used when starting an integrated
development environment, for instance @command{GPS} or @command{Gnatbench}.
@ -3211,22 +3217,26 @@ The following packages are currently supported in project files
@item Linker
This package specifies the options used by the linker.
@xref{Main Subprograms}.
@ifclear FSFEDITION
@item Metrics
This package specifies the options used when calling the tool
@command{gnatmetric} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}.
@end ifclear
@item Naming
This package specifies the naming conventions that apply
to the source files in a project. In particular, these conventions are
used to automatically find all source files in the source directories,
or given a file name to find out its language for proper processing.
@xref{Naming Schemes}.
@ifclear FSFEDITION
@item Pretty_Printer
This package specifies the options used when calling the formatting tool
@command{gnatpp} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}.
@end ifclear
@item Remote
This package is used by @command{gprbuild} to describe how distributed
compilation should be done.
@ -3648,20 +3658,30 @@ end MyProj;
* Project Level Attributes::
* Package Binder Attributes::
* Package Builder Attributes::
@ifclear FSFEDITION
* Package Check Attributes::
@end ifclear
* Package Clean Attributes::
* Package Compiler Attributes::
* Package Cross_Reference Attributes::
@ifclear FSFEDITION
* Package Eliminate Attributes::
@end ifclear
* Package Finder Attributes::
* Package ^gnatls^gnatls^ Attributes::
@ifclear FSFEDITION
* Package ^gnatstub^gnatstub^ Attributes::
@end ifclear
* Package IDE Attributes::
* Package Install Attributes::
* Package Linker Attributes::
@ifclear FSFEDITION
* Package Metrics Attribute::
@end ifclear
* Package Naming Attributes::
@ifclear FSFEDITION
* Package Pretty_Printer Attributes::
@end ifclear
* Package Remote Attributes::
* Package Stack Attributes::
* Package Synchronize Attributes::
@ -4310,6 +4330,7 @@ project tree.
@end itemize
@ifclear FSFEDITION
@node Package Check Attributes
@subsubsection Package Check Attributes
@ -4328,6 +4349,7 @@ Index is a source file name. Value is the list of switches to be used when
invoking @code{gnatcheck} for the source.
@end itemize
@end ifclear
@node Package Clean Attributes
@subsubsection Package Clean Attributes
@ -4619,6 +4641,7 @@ invoking @code{gnatxref} for the source.
@end itemize
@ifclear FSFEDITION
@node Package Eliminate Attributes
@subsubsection Package Eliminate Attributes
@ -4637,6 +4660,7 @@ Index is a source file name. Value is the list of switches to be used when
invoking @code{gnatelim} for the source.
@end itemize
@end ifclear
@node Package Finder Attributes
@subsubsection Package Finder Attributes
@ -4668,6 +4692,7 @@ Value is a list of switches to be used when invoking @code{gnatls}.
@end itemize
@ifclear FSFEDITION
@node Package ^gnatstub^gnatstub^ Attributes
@subsubsection Package ^gnatstub^gnatstub^ Attributes
@ -4686,6 +4711,7 @@ Index is a source file name. Value is the list of switches to be used when
invoking @code{gnatstub} for the source.
@end itemize
@end ifclear
@node Package IDE Attributes
@subsubsection Package IDE Attributes
@ -4878,6 +4904,7 @@ Value is the list of switches to specify a response file to the linker.
@end itemize
@ifclear FSFEDITION
@node Package Metrics Attribute
@subsubsection Package Metrics Attribute
@ -4896,6 +4923,7 @@ Index is a source file name. Value is the list of switches to be used when
invoking @code{gnatmetric} for the source.
@end itemize
@end ifclear
@node Package Naming Attributes
@subsubsection Package Naming Attributes
@ -4966,6 +4994,7 @@ be found in the source directories of the project.
@end itemize
@ifclear FSFEDITION
@node Package Pretty_Printer Attributes
@subsubsection Package Pretty_Printer Attributes
@ -4984,6 +5013,7 @@ Index is a source file name. Value is the list of switches to be used when
invoking @code{gnatpp} for the source.
@end itemize
@end ifclear
@node Package Remote Attributes
@subsubsection Package Remote Attributes

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2011-2012, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2013, Free Software Foundation, Inc. --
-- --
-- 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- --
@ -44,7 +44,7 @@
-- (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
-- (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
-- (Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'),
-- (Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => "Θ"),
-- (Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => '@'),
-- (Unit_Name => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
-- (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));

View File

@ -53,7 +53,7 @@ package System.Dim.Mks is
(Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
(Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
(Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'),
(Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => "Θ"),
(Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => '@'),
(Unit_Name => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
(Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));

View File

@ -2381,9 +2381,8 @@ package body Sem_Ch3 is
elsif Nkind (Decl) = N_Subprogram_Body then
Analyze_Subprogram_Body_Contract (Defining_Entity (Decl));
elsif Nkind_In (Decl,
N_Subprogram_Declaration,
N_Abstract_Subprogram_Declaration)
elsif Nkind_In (Decl, N_Subprogram_Declaration,
N_Abstract_Subprogram_Declaration)
then
Analyze_Subprogram_Contract (Defining_Entity (Decl));
end if;

View File

@ -4456,7 +4456,13 @@ package body Sem_Prag is
("argument of pragma% must be protected procedure", Arg1);
end if;
if Parent (N) /= Protected_Definition (Parent (Proc_Scope)) then
-- For pragma case (as opposed to access case), check placement.
-- We don't need to do that for aspects, because we have the
-- check that they are apply an appropriate procedure.
if not From_Aspect_Specification (N)
and then Parent (N) /= Protected_Definition (Parent (Proc_Scope))
then
Error_Pragma ("pragma% must be in protected definition");
end if;
end if;