]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2014 12:58:03 +0000 (14:58 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2014 12:58:03 +0000 (14:58 +0200)
2014-07-30  Yannick Moy  <moy@adacore.com>

* sem_ch6.adb: Add comments.

2014-07-30  Thomas Quinot  <quinot@adacore.com>

* s-os_lib.ads (GM_Time_Of): Clarify documentation.

2014-07-30  Robert Dewar  <dewar@adacore.com>

* sem_aggr.adb, sem_res.adb: Minor reformatting.

2014-07-30  Thomas Quinot  <quinot@adacore.com>

* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
Bit_Order): Set Reverse_Bit_Order on the base type of the
specified first subtype.

From-SVN: r213261

gcc/ada/ChangeLog
gcc/ada/s-os_lib.ads
gcc/ada/sem_aggr.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_res.adb

index 2f3bd34d8b9dc68df9d2320ad01eed1e0cd7dad6..6986a473d293a2abd949fa92357dbc463bc18b99 100644 (file)
@@ -1,3 +1,21 @@
+2014-07-30  Yannick Moy  <moy@adacore.com>
+
+       * sem_ch6.adb: Add comments.
+
+2014-07-30  Thomas Quinot  <quinot@adacore.com>
+
+       * s-os_lib.ads (GM_Time_Of): Clarify documentation.
+
+2014-07-30  Robert Dewar  <dewar@adacore.com>
+
+       * sem_aggr.adb, sem_res.adb: Minor reformatting.
+
+2014-07-30  Thomas Quinot  <quinot@adacore.com>
+
+       * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
+       Bit_Order): Set Reverse_Bit_Order on the base type of the
+       specified first subtype.
+
 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
 
        * inline.adb (Expand_Inlined_Call): Use a renaming declaration
index a79e0b9c9a4927d02593c5784a87510b5657abac..d50d11f3276cc9aa10a88a9e4772aa3bd13361a6 100644 (file)
@@ -160,8 +160,8 @@ package System.OS_Lib is
       Minute : Minute_Type;
       Second : Second_Type) return OS_Time;
    --  Analogous to the Time_Of routine in Ada.Calendar, takes a set of time
-   --  component parts and returns an OS_Time. Returns Invalid_Time if the
-   --  creation fails.
+   --  component parts to be interpreted in the local time zone, and returns
+   --  an OS_Time. Returns Invalid_Time if the creation fails.
 
    function Current_Time_String return String;
    --  Returns current local time in the form YYYY-MM-DD HH:MM:SS. The result
index 3e71ebe0de520c106a63aa8023d0be4ead46e9f7..bc0ed547a50b8ba0e108f1a19c6baf515ffa191f 100644 (file)
@@ -111,7 +111,8 @@ package body Sem_Aggr is
    --  Check that Expr is either not limited or else is one of the cases of
    --  expressions allowed for a limited component association (namely, an
    --  aggregate, function call, or <> notation). Report error for violations.
-   --  Expression is also OK in an instance or inlining context.
+   --  Expression is also OK in an instance or inlining context, because we
+   --  have already analyzed and checked it.
 
    procedure Check_Qualified_Aggregate (Level : Nat; Expr : Node_Id);
    --  Given aggregate Expr, check that sub-aggregates of Expr that are nested
index a0262230cdd743b23f8c044cb1c0388b8d710fe2..a9fa109e98c25e71f9a33e04595fd817886e3f48 100644 (file)
@@ -4293,7 +4293,7 @@ package body Sem_Ch13 is
 
                else
                   if (Expr_Value (Expr) = 0) /= Bytes_Big_Endian then
-                     Set_Reverse_Bit_Order (U_Ent, True);
+                     Set_Reverse_Bit_Order (Base_Type (U_Ent), True);
                   end if;
                end if;
             end if;
index c18718e8110c1665ba3a148e08dbc81ebe9c4f72..c7b01b4b368666c761f99f91b18525d62def0fdc 100644 (file)
@@ -3031,16 +3031,44 @@ package body Sem_Ch6 is
                --  We make two copies of the given spec, one for the new
                --  declaration, and one for the body.
 
-               --  This cannot be done for a compilation unit, which is not
-               --  in a context where we can insert a new spec.
-
                if No (Spec_Id)
                  and then GNATprove_Mode
+
+                 --  Under a debug flag until remaining issues are fixed
+
                  and then Debug_Flag_QQ
+
+                 --  Inlining does not apply during pre-analysis of code
+
                  and then Full_Analysis
+
+                 --  Inlining only applies to full bodies, not stubs
+
                  and then Nkind (N) /= N_Subprogram_Body_Stub
+
+                 --  Inlining only applies to bodies in the source code, not to
+                 --  those generated by the compiler. In particular, expression
+                 --  functions, whose body is generated by the compiler, are
+                 --  treated specially by GNATprove.
+
                  and then Comes_From_Source (Body_Id)
+
+                 --  This cannot be done for a compilation unit, which is not
+                 --  in a context where we can insert a new spec.
+
                  and then Is_List_Member (N)
+
+                 --  Inlining only applies to subprograms without contracts,
+                 --  as a contract is a sign that GNATprove should perform a
+                 --  modular analysis of the subprogram instead of a contextual
+                 --  analysis at each call site. The same test is performed in
+                 --  Inline.Can_Be_Inlined_In_GNATprove_Mode. It is repeated
+                 --  here in another form (because the contract has not
+                 --  been attached to the body) to avoid frontend errors in
+                 --  case pragmas are used instead of aspects, because the
+                 --  corresponding pragmas in the body would not be transferred
+                 --  to the spec, leading to legality errors.
+
                  and then not Body_Has_Contract
                then
                   declare
index 52b717e0593df5ce16cafe5a8b1d2460fc4820c0..e68310b9776dcdb8fa47e286ae77298c76ba059a 100644 (file)
@@ -10686,10 +10686,9 @@ package body Sem_Res is
       --  (In other contexts conversions cannot apply to literals).
 
       if In_Inlined_Body
-        and then
-          (Opnd_Type = Any_Character or else
-           Opnd_Type = Any_Integer   or else
-           Opnd_Type = Any_Real)
+        and then (Opnd_Type = Any_Character or else
+                  Opnd_Type = Any_Integer   or else
+                  Opnd_Type = Any_Real)
       then
          Set_Etype (Operand, Typ);
       end if;
This page took 0.12043 seconds and 5 git commands to generate.