Commit 1037b0f4 by Arnaud Charlet

[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
parent ebb6b0bd
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> 2014-02-24 Yannick Moy <moy@adacore.com>
* freeze.adb (Freeze_Entity): Do not issue warning * freeze.adb (Freeze_Entity): Do not issue warning
......
...@@ -7615,7 +7615,7 @@ package body Exp_Ch4 is ...@@ -7615,7 +7615,7 @@ package body Exp_Ch4 is
-- arithmetic instructions check overflow automatically, so only -- arithmetic instructions check overflow automatically, so only
-- one version of the exponentiation unit is needed. -- 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; Rent := RE_Exp_Long_Long_Integer;
else else
Rent := RE_Exn_Long_Long_Integer; Rent := RE_Exn_Long_Long_Integer;
...@@ -7628,7 +7628,7 @@ package body Exp_Ch4 is ...@@ -7628,7 +7628,7 @@ package body Exp_Ch4 is
-- arithmetic instructions check overflow automatically, so only -- arithmetic instructions check overflow automatically, so only
-- one version of the exponentiation unit is needed. -- 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; Rent := RE_Exp_Integer;
else else
Rent := RE_Exn_Integer; Rent := RE_Exn_Integer;
......
...@@ -3871,9 +3871,9 @@ package body Freeze is ...@@ -3871,9 +3871,9 @@ package body Freeze is
-- Pre/post conditions are implemented through a subprogram -- Pre/post conditions are implemented through a subprogram
-- in the corresponding body, and therefore are not checked on -- in the corresponding body, and therefore are not checked on
-- an imported subprogram for which the body is not available. -- an imported subprogram for which the body is not available.
-- This warning is not issued in GNATprove mode, as these -- This warning is not issued in GNATprove mode, as all these
-- contracts are handled in formal verification, so the -- contracts are handled in formal verification, so the warning
-- warning would be misleading in that case. -- would be misleading in that case.
-- Could consider generating a wrapper to take care of this??? -- Could consider generating a wrapper to take care of this???
...@@ -3887,7 +3887,6 @@ package body Freeze is ...@@ -3887,7 +3887,6 @@ package body Freeze is
("pre/post conditions on imported subprogram are not " ("pre/post conditions on imported subprogram are not "
& "enforced??", E, Pre_Post_Conditions (Contract (E))); & "enforced??", E, Pre_Post_Conditions (Contract (E)));
end if; end if;
end if; end if;
-- Must freeze its parent first if it is a derived subprogram -- Must freeze its parent first if it is a derived subprogram
......
...@@ -3166,6 +3166,7 @@ The following packages are currently supported in project files ...@@ -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 but there are some general options that should be defined in this
package. @xref{Main Subprograms}, and @pxref{Executable File Names} in package. @xref{Main Subprograms}, and @pxref{Executable File Names} in
particular. particular.
@ifclear FSFEDITION
@item Check @item Check
This package specifies the options used when calling the checking tool This package specifies the options used when calling the checking tool
@command{gnatcheck} via the @command{gnat} driver. Its attribute @command{gnatcheck} via the @command{gnat} driver. Its attribute
...@@ -3173,6 +3174,7 @@ The following packages are currently supported in project files ...@@ -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 @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 that all the other options belong to the @code{-rules} section of the
parameters to @command{gnatcheck}. parameters to @command{gnatcheck}.
@end ifclear
@item Clean @item Clean
This package specifies the options used when cleaning a project or a project This package specifies the options used when cleaning a project or a project
tree using the tools @command{gnatclean} or @command{gprclean}. tree using the tools @command{gnatclean} or @command{gprclean}.
...@@ -3184,11 +3186,13 @@ The following packages are currently supported in project files ...@@ -3184,11 +3186,13 @@ The following packages are currently supported in project files
@command{gnatxref} via the @command{gnat} driver. Its attributes @command{gnatxref} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the @b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}. package @code{Builder}.
@ifclear FSFEDITION
@item Eliminate @item Eliminate
This package specifies the options used when calling the tool This package specifies the options used when calling the tool
@command{gnatelim} via the @command{gnat} driver. Its attributes @command{gnatelim} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the @b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}. package @code{Builder}.
@end ifclear
@item Finder @item Finder
This package specifies the options used when calling the search tool This package specifies the options used when calling the search tool
@command{gnatfind} via the @command{gnat} driver. Its attributes @command{gnatfind} via the @command{gnat} driver. Its attributes
...@@ -3197,11 +3201,13 @@ The following packages are currently supported in project files ...@@ -3197,11 +3201,13 @@ The following packages are currently supported in project files
@item ^Gnatls^Gnatls^ @item ^Gnatls^Gnatls^
This package specifies the options to use when invoking @command{gnatls} This package specifies the options to use when invoking @command{gnatls}
via the @command{gnat} driver. via the @command{gnat} driver.
@ifclear FSFEDITION
@item ^Gnatstub^Gnatstub^ @item ^Gnatstub^Gnatstub^
This package specifies the options used when calling the tool This package specifies the options used when calling the tool
@command{gnatstub} via the @command{gnat} driver. Its attributes @command{gnatstub} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the @b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}. package @code{Builder}.
@end ifclear
@item IDE @item IDE
This package specifies the options used when starting an integrated This package specifies the options used when starting an integrated
development environment, for instance @command{GPS} or @command{Gnatbench}. development environment, for instance @command{GPS} or @command{Gnatbench}.
...@@ -3211,22 +3217,26 @@ The following packages are currently supported in project files ...@@ -3211,22 +3217,26 @@ The following packages are currently supported in project files
@item Linker @item Linker
This package specifies the options used by the linker. This package specifies the options used by the linker.
@xref{Main Subprograms}. @xref{Main Subprograms}.
@ifclear FSFEDITION
@item Metrics @item Metrics
This package specifies the options used when calling the tool This package specifies the options used when calling the tool
@command{gnatmetric} via the @command{gnat} driver. Its attributes @command{gnatmetric} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the @b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}. package @code{Builder}.
@end ifclear
@item Naming @item Naming
This package specifies the naming conventions that apply This package specifies the naming conventions that apply
to the source files in a project. In particular, these conventions are to the source files in a project. In particular, these conventions are
used to automatically find all source files in the source directories, used to automatically find all source files in the source directories,
or given a file name to find out its language for proper processing. or given a file name to find out its language for proper processing.
@xref{Naming Schemes}. @xref{Naming Schemes}.
@ifclear FSFEDITION
@item Pretty_Printer @item Pretty_Printer
This package specifies the options used when calling the formatting tool This package specifies the options used when calling the formatting tool
@command{gnatpp} via the @command{gnat} driver. Its attributes @command{gnatpp} via the @command{gnat} driver. Its attributes
@b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the @b{Default_Switches} and @b{^Switches^Switches^} have the same semantics as for the
package @code{Builder}. package @code{Builder}.
@end ifclear
@item Remote @item Remote
This package is used by @command{gprbuild} to describe how distributed This package is used by @command{gprbuild} to describe how distributed
compilation should be done. compilation should be done.
...@@ -3648,20 +3658,30 @@ end MyProj; ...@@ -3648,20 +3658,30 @@ end MyProj;
* Project Level Attributes:: * Project Level Attributes::
* Package Binder Attributes:: * Package Binder Attributes::
* Package Builder Attributes:: * Package Builder Attributes::
@ifclear FSFEDITION
* Package Check Attributes:: * Package Check Attributes::
@end ifclear
* Package Clean Attributes:: * Package Clean Attributes::
* Package Compiler Attributes:: * Package Compiler Attributes::
* Package Cross_Reference Attributes:: * Package Cross_Reference Attributes::
@ifclear FSFEDITION
* Package Eliminate Attributes:: * Package Eliminate Attributes::
@end ifclear
* Package Finder Attributes:: * Package Finder Attributes::
* Package ^gnatls^gnatls^ Attributes:: * Package ^gnatls^gnatls^ Attributes::
@ifclear FSFEDITION
* Package ^gnatstub^gnatstub^ Attributes:: * Package ^gnatstub^gnatstub^ Attributes::
@end ifclear
* Package IDE Attributes:: * Package IDE Attributes::
* Package Install Attributes:: * Package Install Attributes::
* Package Linker Attributes:: * Package Linker Attributes::
@ifclear FSFEDITION
* Package Metrics Attribute:: * Package Metrics Attribute::
@end ifclear
* Package Naming Attributes:: * Package Naming Attributes::
@ifclear FSFEDITION
* Package Pretty_Printer Attributes:: * Package Pretty_Printer Attributes::
@end ifclear
* Package Remote Attributes:: * Package Remote Attributes::
* Package Stack Attributes:: * Package Stack Attributes::
* Package Synchronize Attributes:: * Package Synchronize Attributes::
...@@ -4310,6 +4330,7 @@ project tree. ...@@ -4310,6 +4330,7 @@ project tree.
@end itemize @end itemize
@ifclear FSFEDITION
@node Package Check Attributes @node Package Check Attributes
@subsubsection 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 ...@@ -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. invoking @code{gnatcheck} for the source.
@end itemize @end itemize
@end ifclear
@node Package Clean Attributes @node Package Clean Attributes
@subsubsection Package Clean Attributes @subsubsection Package Clean Attributes
...@@ -4619,6 +4641,7 @@ invoking @code{gnatxref} for the source. ...@@ -4619,6 +4641,7 @@ invoking @code{gnatxref} for the source.
@end itemize @end itemize
@ifclear FSFEDITION
@node Package Eliminate Attributes @node Package Eliminate Attributes
@subsubsection 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 ...@@ -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. invoking @code{gnatelim} for the source.
@end itemize @end itemize
@end ifclear
@node Package Finder Attributes @node Package Finder Attributes
@subsubsection Package Finder Attributes @subsubsection Package Finder Attributes
...@@ -4668,6 +4692,7 @@ Value is a list of switches to be used when invoking @code{gnatls}. ...@@ -4668,6 +4692,7 @@ Value is a list of switches to be used when invoking @code{gnatls}.
@end itemize @end itemize
@ifclear FSFEDITION
@node Package ^gnatstub^gnatstub^ Attributes @node Package ^gnatstub^gnatstub^ Attributes
@subsubsection 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 ...@@ -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. invoking @code{gnatstub} for the source.
@end itemize @end itemize
@end ifclear
@node Package IDE Attributes @node Package IDE Attributes
@subsubsection 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. ...@@ -4878,6 +4904,7 @@ Value is the list of switches to specify a response file to the linker.
@end itemize @end itemize
@ifclear FSFEDITION
@node Package Metrics Attribute @node Package Metrics Attribute
@subsubsection 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 ...@@ -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. invoking @code{gnatmetric} for the source.
@end itemize @end itemize
@end ifclear
@node Package Naming Attributes @node Package Naming Attributes
@subsubsection Package Naming Attributes @subsubsection Package Naming Attributes
...@@ -4966,6 +4994,7 @@ be found in the source directories of the project. ...@@ -4966,6 +4994,7 @@ be found in the source directories of the project.
@end itemize @end itemize
@ifclear FSFEDITION
@node Package Pretty_Printer Attributes @node Package Pretty_Printer Attributes
@subsubsection 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 ...@@ -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. invoking @code{gnatpp} for the source.
@end itemize @end itemize
@end ifclear
@node Package Remote Attributes @node Package Remote Attributes
@subsubsection Package Remote Attributes @subsubsection Package Remote Attributes
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- --
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
-- (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'), -- (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
-- (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'), -- (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
-- (Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'), -- (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 => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
-- (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J')); -- (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));
......
...@@ -53,7 +53,7 @@ package System.Dim.Mks is ...@@ -53,7 +53,7 @@ package System.Dim.Mks is
(Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'), (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
(Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'), (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
(Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'), (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 => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
(Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J')); (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));
......
...@@ -2381,9 +2381,8 @@ package body Sem_Ch3 is ...@@ -2381,9 +2381,8 @@ package body Sem_Ch3 is
elsif Nkind (Decl) = N_Subprogram_Body then elsif Nkind (Decl) = N_Subprogram_Body then
Analyze_Subprogram_Body_Contract (Defining_Entity (Decl)); Analyze_Subprogram_Body_Contract (Defining_Entity (Decl));
elsif Nkind_In (Decl, elsif Nkind_In (Decl, N_Subprogram_Declaration,
N_Subprogram_Declaration, N_Abstract_Subprogram_Declaration)
N_Abstract_Subprogram_Declaration)
then then
Analyze_Subprogram_Contract (Defining_Entity (Decl)); Analyze_Subprogram_Contract (Defining_Entity (Decl));
end if; end if;
......
...@@ -4456,7 +4456,13 @@ package body Sem_Prag is ...@@ -4456,7 +4456,13 @@ package body Sem_Prag is
("argument of pragma% must be protected procedure", Arg1); ("argument of pragma% must be protected procedure", Arg1);
end if; 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"); Error_Pragma ("pragma% must be in protected definition");
end if; end if;
end if; end if;
......
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