]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 6 Aug 2012 08:12:36 +0000 (10:12 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 6 Aug 2012 08:12:36 +0000 (10:12 +0200)
2012-08-06  Robert Dewar  <dewar@adacore.com>

* sem_ch6.adb: Remove useless flag Body_Deleted.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

* sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
as this is what all usage occurrences of this attribute are
expecting.
* uintp.adb (UI_To_Int): Add assertion to guard against calling
with No_Uint.

From-SVN: r190164

gcc/ada/ChangeLog
gcc/ada/sem_ch6.adb
gcc/ada/sinfo.ads
gcc/ada/uintp.adb

index b538ecfc8f3b4ebd2339d6d91932244fe35da4b3..2533fd336b59699f8b0b7a5619bc491c0547057e 100644 (file)
@@ -1,3 +1,45 @@
+2012-08-06  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch6.adb: Remove useless flag Body_Deleted.
+
+2012-08-06  Thomas Quinot  <quinot@adacore.com>
+
+       * sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
+       as this is what all usage occurrences of this attribute are
+       expecting.
+       * uintp.adb (UI_To_Int): Add assertion to guard against calling
+       with No_Uint.
+
+2012-08-06  Vincent Pucci  <pucci@adacore.com>
+
+PR ada/54125
+       * exp_attr.adb (Expand_N_Attribute_Reference): Expand new
+       Atomic_Always_Lock_Free attribute.
+       * sem_attr.adb (Analyze_Attribute): Analyze new
+       Atomic_Always_Lock_Free attribute.
+       (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
+       attribute.
+       * sem_ch9.adb (Allows_Lock_Free_Implementation):
+       Support_Atomic_Primitives check replaces previous erroneous
+       size check.
+       * sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
+       New routine.
+       * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
+       new attribute Attribute_Atomic_Always_Lock_Free defined.
+       * s-atopri.adb: Support_Atomic_Primitives checks replaced by
+       Atomic_Always_Lock_Free queries.
+       * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
+       system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
+       system-linux-ppc.ads, system-linux-s390.ads,
+       system-linux-s390x.ads, system-linux-sh4.ads,
+       system-linux-sparc.ads, system-lynxos178-ppc.ads,
+       system-lynxos-ppc.ads, system-mingw.ads,
+       system-vxworks-arm.ads, system-solaris-sparc.ads,
+       system-solaris-sparcv9.ads, system-vms_64.ads,
+       system-vxworks-m68k.ads, system-vxworks-mips.ads,
+       system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
+       Support_Atomic_Primitives removed.
+
 2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
index 5f061616ee3e409743b6d2897469f23c75378553..d48dd10e524df2ec69e3dbf88653d2c9b6a62daa 100644 (file)
@@ -1804,7 +1804,6 @@ package body Sem_Ch6 is
 
    procedure Analyze_Subprogram_Body_Helper (N : Node_Id) is
       Loc          : constant Source_Ptr := Sloc (N);
-      Body_Deleted : constant Boolean    := False;
       Body_Spec    : constant Node_Id    := Specification (N);
       Body_Id      : Entity_Id           := Defining_Entity (Body_Spec);
       Prev_Id      : constant Entity_Id  := Current_Entity_In_Scope (Body_Id);
@@ -2076,9 +2075,8 @@ package body Sem_Ch6 is
                   Set_Has_Missing_Return (Id);
                end if;
 
-            elsif (Is_Generic_Subprogram (Id)
-                     or else not Is_Machine_Code_Subprogram (Id))
-              and then not Body_Deleted
+            elsif Is_Generic_Subprogram (Id)
+              or else not Is_Machine_Code_Subprogram (Id)
             then
                Error_Msg_N ("missing RETURN statement in function body", N);
             end if;
@@ -3133,13 +3131,9 @@ package body Sem_Ch6 is
             end loop;
          end if;
 
-         --  Check references in body unless it was deleted. Note that the
-         --  check of Body_Deleted here is not just for efficiency, it is
-         --  necessary to avoid junk warnings on formal parameters.
+         --  Check references in body
 
-         if not Body_Deleted then
-            Check_References (Body_Id);
-         end if;
+         Check_References (Body_Id);
       end;
    end Analyze_Subprogram_Body_Helper;
 
index ec8e9aedeffdada553836e8bd9706019401688ec..50135afca2a78a6cbed8670329ca4878ad2f184c 100644 (file)
@@ -4119,7 +4119,7 @@ package Sinfo is
       --  Then_Statements (List2)
       --  Elsif_Parts (List3) (set to No_List if none present)
       --  Else_Statements (List4) (set to No_List if no else part present)
-      --  End_Span (Uint5) (set to No_Uint if expander generated)
+      --  End_Span (Uint5) (set to Uint_0 if expander generated)
 
       --  N_Elsif_Part
       --  Sloc points to ELSIF
@@ -4151,7 +4151,7 @@ package Sinfo is
       --  Sloc points to CASE
       --  Expression (Node3)
       --  Alternatives (List4)
-      --  End_Span (Uint5) (set to No_Uint if expander generated)
+      --  End_Span (Uint5) (set to Uint_0 if expander generated)
 
       --  Note: Before Ada 2012, a pragma in a statement sequence is always
       --  followed by a statement, and this is true in the tree even in Ada
index ce7436ffccd19a74b97cf4d8891a4e3c7424cd64..a98bd9f376bd412f8845c8947a1538b01a4a1c37 100644 (file)
@@ -2213,6 +2213,8 @@ package body Uintp is
    ----------------
 
    function UI_To_Int (Input : Uint) return Int is
+      pragma Assert (Input /= No_Uint);
+
    begin
       if Direct (Input) then
          return Direct_Val (Input);