]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-07-16 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 14:03:00 +0000 (14:03 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 14:03:00 +0000 (14:03 +0000)
* 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

gcc/ada/ChangeLog
gcc/ada/a-cohase.ads
gcc/ada/a-coinho-shared.adb
gcc/ada/a-coinho-shared.ads
gcc/ada/exp_ch4.adb
gcc/ada/exp_util.adb
gcc/ada/gnat_ugn.texi
gcc/ada/sem_attr.adb

index e5f0504581409002bfe188c80f35e134aa5bbcb1..898468ce82823b838eed946ae80f9a73d2a0565d 100644 (file)
@@ -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
index 9e4ebc173f585431f05ef57a0fe3e8865f2aabac..9c112fa3ee20d8b53601b836398f757585dda8b5 100644 (file)
@@ -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;
 
index be45c90fd5abafed2ae2ebf445ed943a7f01e0d6..1f3d8bc5f91b05fdc0092d4f30e3ec87e4a92c1b 100644 (file)
@@ -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
index df364b3426e75e7441878d53ec8a7088439dcad3..b040e666141e86a8d526ce9013b0c960b780f3d6 100644 (file)
 -- <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;
index 1ef60a29b2cf3a8005da126f1fee2a9bdfefd04a..4f60b312c7c0b3c0c22fc9d406021ffcb0e0792a 100644 (file)
@@ -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
index fca843255d3695e2a7dfe3fcd6fe159ed832dd22..bd0e5aacede402d43a08eb073f87b0e927cc8a54 100644 (file)
@@ -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
index dde83b45c17906b33a4c912aae8cc921e621dd66..d2f081865933dcc36ff38686230512b357520d58 100644 (file)
@@ -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
 
index bf3c3c7d9651bd5993ee305f23844d3490a89e52..371bb063fe349ded90fe1b8745f9decce68d5077 100644 (file)
@@ -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