summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-16 14:03:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-16 14:03:00 +0000
commit865bc7c67663a5cac6c0f94138bd726283b78397 (patch)
treefcd24794771ee85269b3df27270adacde1114f64 /gcc
parent8edddf501d19cd29ff23d7ea731c66f3d3a1c8ff (diff)
downloadgcc-865bc7c67663a5cac6c0f94138bd726283b78397.tar.gz
2014-07-16 Robert Dewar <dewar@adacore.com>
* exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads, a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting. 2014-07-16 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: Add note that integrated preprocessing cannot be applied to configuration pragma files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212648 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/a-cohase.ads7
-rw-r--r--gcc/ada/a-coinho-shared.adb35
-rw-r--r--gcc/ada/a-coinho-shared.ads4
-rw-r--r--gcc/ada/exp_ch4.adb16
-rw-r--r--gcc/ada/exp_util.adb4
-rw-r--r--gcc/ada/gnat_ugn.texi45
-rw-r--r--gcc/ada/sem_attr.adb10
8 files changed, 65 insertions, 66 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e5f05045814..898468ce828 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2014-07-16 Robert Dewar <dewar@adacore.com>
+
+ * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
+ a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
+
+2014-07-16 Robert Dewar <dewar@adacore.com>
+
+ * gnat_ugn.texi: Add note that integrated
+ preprocessing cannot be applied to configuration pragma files.
+
2014-07-16 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute/cases Pred
diff --git a/gcc/ada/a-cohase.ads b/gcc/ada/a-cohase.ads
index 9e4ebc173f5..9c112fa3ee2 100644
--- a/gcc/ada/a-cohase.ads
+++ b/gcc/ada/a-cohase.ads
@@ -544,9 +544,10 @@ private
No_Element : constant Cursor := (Container => null, Node => null);
type Iterator is new Limited_Controlled
- and Set_Iterator_Interfaces.Forward_Iterator with record
- Container : Set_Access;
- end record;
+ and Set_Iterator_Interfaces.Forward_Iterator with
+ record
+ Container : Set_Access;
+ end record;
overriding function First (Object : Iterator) return Cursor;
diff --git a/gcc/ada/a-coinho-shared.adb b/gcc/ada/a-coinho-shared.adb
index be45c90fd5a..1f3d8bc5f91 100644
--- a/gcc/ada/a-coinho-shared.adb
+++ b/gcc/ada/a-coinho-shared.adb
@@ -39,12 +39,14 @@ package body Ada.Containers.Indefinite_Holders is
function "=" (Left, Right : Holder) return Boolean is
begin
if Left.Reference = Right.Reference then
- -- Covers both null and not null but the same shared object cases.
+
+ -- Covers both null and not null but the same shared object cases
return True;
elsif Left.Reference /= null and Right.Reference /= null then
return Left.Reference.Element.all = Right.Reference.Element.all;
+
else
return False;
end if;
@@ -58,7 +60,8 @@ package body Ada.Containers.Indefinite_Holders is
begin
if Container.Reference /= null then
if Container.Busy = 0 then
- -- Container is not locked, reuse existing internal shared object.
+
+ -- Container is not locked, reuse existing internal shared object
Reference (Container.Reference);
else
@@ -164,20 +167,23 @@ package body Ada.Containers.Indefinite_Holders is
begin
if Source.Reference = null then
return (Controlled with null, 0);
+
elsif Source.Busy = 0 then
- -- Container is not locked, reuse internal shared object.
+
+ -- Container is not locked, reuse internal shared object
Reference (Source.Reference);
return (Controlled with Source.Reference, 0);
+
else
- -- Otherwise, create copy of both internal shared object and elemet.
+ -- Otherwise, create copy of both internal shared object and element
return
(Controlled with
- new Shared_Holder'
- (Counter => <>,
- Element => new Element_Type'(Source.Reference.Element.all)),
+ new Shared_Holder'
+ (Counter => <>,
+ Element => new Element_Type'(Source.Reference.Element.all)),
0);
end if;
end Copy;
@@ -268,8 +274,8 @@ package body Ada.Containers.Indefinite_Holders is
raise Constraint_Error with "container is empty";
elsif Container.Busy = 0
- and then not System.Atomic_Counters.Is_One
- (Container.Reference.Counter)
+ and then
+ not System.Atomic_Counters.Is_One (Container.Reference.Counter)
then
-- Container is not locked and internal shared object is used by
-- other container, create copy of both internal shared object and
@@ -339,14 +345,15 @@ package body Ada.Containers.Indefinite_Holders is
end Reference;
function Reference
- (Container : aliased in out Holder) return Reference_Type is
+ (Container : aliased in out Holder) return Reference_Type
+ is
begin
if Container.Reference = null then
raise Constraint_Error with "container is empty";
elsif Container.Busy = 0
- and then not System.Atomic_Counters.Is_One
- (Container.Reference.Counter)
+ and then
+ not System.Atomic_Counters.Is_One (Container.Reference.Counter)
then
-- Container is not locked and internal shared object is used by
-- other container, create copy of both internal shared object and
@@ -463,8 +470,8 @@ package body Ada.Containers.Indefinite_Holders is
raise Constraint_Error with "container is empty";
elsif Container.Busy = 0
- and then not System.Atomic_Counters.Is_One
- (Container.Reference.Counter)
+ and then
+ not System.Atomic_Counters.Is_One (Container.Reference.Counter)
then
-- Container is not locked and internal shared object is used by
-- other container, create copy of both internal shared object and
diff --git a/gcc/ada/a-coinho-shared.ads b/gcc/ada/a-coinho-shared.ads
index df364b3426e..b040e666141 100644
--- a/gcc/ada/a-coinho-shared.ads
+++ b/gcc/ada/a-coinho-shared.ads
@@ -29,6 +29,10 @@
-- <http://www.gnu.org/licenses/>. --
------------------------------------------------------------------------------
+-- Missing documentation: what is this unit all about??? From its name it
+-- is some variation of a-coinho.ads/adb, but documentation needs to be
+-- HERE explaining that ???
+
private with Ada.Finalization;
private with Ada.Streams;
private with System.Atomic_Counters;
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 1ef60a29b2c..4f60b312c7c 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -12558,7 +12558,7 @@ package body Exp_Ch4 is
Temp_Id : Entity_Id;
Temp_Ins : Node_Id;
- Hook_Context : constant Node_Id := Find_Hook_Context (Rel_Node);
+ Hook_Context : constant Node_Id := Find_Hook_Context (Rel_Node);
-- Node on which to insert the hook pointer (as an action): the
-- innermost enclosing non-transient scope.
@@ -12566,8 +12566,8 @@ package body Exp_Ch4 is
-- Node after which to insert finalization actions
Finalize_Always : Boolean;
- -- If False, call to finalizer includes a test of whether the
- -- hook pointer is null.
+ -- If False, call to finalizer includes a test of whether the hook
+ -- pointer is null.
In_Cond_Expr : constant Boolean :=
Within_Case_Or_If_Expression (Rel_Node);
@@ -12582,11 +12582,11 @@ package body Exp_Ch4 is
if Is_Boolean_Type (Etype (Rel_Node)) then
- -- In this case, the finalization context is chosen so that
- -- we know at finalization point that the hook pointer is
- -- never null, so no need for a test, we can call the finalizer
- -- unconditionally, except in the case where the object is
- -- created in a specific branch of a conditional expression.
+ -- In this case, the finalization context is chosen so that we know
+ -- at finalization point that the hook pointer is never null, so no
+ -- need for a test, we can call the finalizer unconditionally, except
+ -- in the case where the object is created in a specific branch of a
+ -- conditional expression.
Finalize_Always :=
not (In_Cond_Expr
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index fca843255d3..bd0e5aacede 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -7343,7 +7343,7 @@ package body Exp_Util is
elsif Is_Access_Type (Obj_Typ)
and then Present (Status_Flag_Or_Transient_Decl (Obj_Id))
and then Nkind (Status_Flag_Or_Transient_Decl (Obj_Id)) =
- N_Object_Declaration
+ N_Object_Declaration
then
return True;
@@ -7353,7 +7353,7 @@ package body Exp_Util is
elsif Is_Access_Type (Obj_Typ)
and then Present (Status_Flag_Or_Transient_Decl (Obj_Id))
and then Nkind (Status_Flag_Or_Transient_Decl (Obj_Id)) =
- N_Defining_Identifier
+ N_Defining_Identifier
and then Present (Expr)
and then Nkind (Expr) = N_Null
then
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index dde83b45c17..d2f08186593 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -7714,6 +7714,8 @@ through a process called preprocessing. Integrated preprocessing is specified
through switches @option{-gnatep} and/or @option{-gnateD}. @option{-gnatep}
indicates, through a text file, the preprocessing data to be used.
@option{-gnateD} specifies or modifies the values of preprocessing symbol.
+Note that integrated preprocessing applies only to Ada source files, it is
+not available for configuration pragma files.
@noindent
Note that when integrated preprocessing is used, the output from the
@@ -15098,7 +15100,6 @@ Ada source code into XML.
@menu
* Switches for gnat2xml::
-* Driving gnat2xml with gnatmake::
* Other Programs::
* Structure of the XML::
@end menu
@@ -15141,8 +15142,14 @@ Options:
the argument project has the value @var{value}. Has no effect if no
project is specified as tool argument.
--mdir -- generate one .xml file for each Ada source file, in directory
- @file{dir}. (Default is to generate the XML to standard output.)
+--incremental -- incremental processing on a per-file basis. Source files are
+ only processed if they have been modified, or if files they depend
+ on have been modified. This is similar to the way gnatmake/gprbuild
+ only compiles files that need to be recompiled.
+
+--output-dir=@var{dir} -- generate one .xml file for each Ada source file, in
+ directory @file{dir}. (Default is to generate the XML to standard
+ output.)
--compact -- debugging version, with interspersed source, and a more
compact representation of "sloc". This version does not conform
@@ -15178,38 +15185,6 @@ body source code lives in mumble-dumble.ads and mumble-dumble.adb,
the above will produce xml-files/mumble-dumble.ads.xml and
xml-files/mumble-dumble.adb.xml.
-@node Driving gnat2xml with gnatmake
-@section Driving @command{gnat2xml} with @command{gnatmake}
-
-@noindent
-You can use gnatmake to drive @command{gnat2xml} to get incremental
-updates of the XML files on a per-source-file basis. For example, if
-you already have a bunch of XML files, and then you change one source
-file, it will regenerate XML files only for that source file, and
-other related source files. Gnatmake takes care of tracking inter-file
-dependencies.
-
-To do this, you tell gnatmake to pretend that @command{gnat2xml} is
-the Ada compiler (instead of using gcc as the Ada compiler, as is
-normal).
-
-To tell gnatmake to use @command{gnat2xml} instead of gcc as the
-``compiler'', for example:
-
-@smallexample
-gnatmake -gnatc main.adb --GCC="gnat2xml -mxml"
-@end smallexample
-
-@noindent
-The @option{--GCC=} switch tells gnatmake that the ``compiler'' to run
-is @command{gnat2xml -mxml}. As usual, @option{-mxml} means to put the
-XML files in the @file{xml} subdirectory.
-
-You must give the @option{-gnatc} switch to gnatmake, which means
-``compile only; do not generate object code''. Otherwise, gnatmake will
-complain about missing object (*.o) files; @command{gnat2xml} of
-course does not generate *.o files.
-
@node Other Programs
@section Other Programs
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index bf3c3c7d965..371bb063fe3 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4843,8 +4843,9 @@ package body Sem_Attr is
Resolve (E1, P_Base_Type);
Set_Etype (N, P_Base_Type);
- -- For floating-point types, enable range check in
- -- Check_Float_Overflow mode only.
+ -- Since Pred works on the base type, we normally do no check for the
+ -- floating-point case, since the base type is unconstrained. But we
+ -- make an exception in Check_Float_Overflow mode.
if Is_Floating_Point_Type (P_Type) then
if Check_Float_Overflow
@@ -5751,8 +5752,9 @@ package body Sem_Attr is
Resolve (E1, P_Base_Type);
Set_Etype (N, P_Base_Type);
- -- For floating-point types, enable range check in
- -- Check_Float_Overflow mode only.
+ -- Since Pred works on the base type, we normally do no check for the
+ -- floating-point case, since the base type is unconstrained. But we
+ -- make an exception in Check_Float_Overflow mode.
if Is_Floating_Point_Type (P_Type) then
if Check_Float_Overflow