OSDN Git Service

2009-04-08 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Apr 2009 15:23:25 +0000 (15:23 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Apr 2009 15:23:25 +0000 (15:23 +0000)
* checks.adb: Minor reformatting

2009-04-08  Vincent Celier  <celier@adacore.com>

* vms_data.ads: Add documentation for new style keyword
OVERRIDING_INDICATORS

2009-04-08  Robert Dewar  <dewar@adacore.com>

* sem_ch3.adb (Check_Completion.Post_Error): Post error on spec if the
spec is in the current unit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145749 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/sem_ch3.adb
gcc/ada/vms_data.ads

index b02ec43..3a6edf9 100644 (file)
@@ -1,3 +1,17 @@
+2009-04-08  Thomas Quinot  <quinot@adacore.com>
+
+       * checks.adb: Minor reformatting
+
+2009-04-08  Vincent Celier  <celier@adacore.com>
+
+       * vms_data.ads: Add documentation for new style keyword
+       OVERRIDING_INDICATORS
+
+2009-04-08  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch3.adb (Check_Completion.Post_Error): Post error on spec if the
+       spec is in the current unit.
+
 2009-04-08  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_util.adb (Is_Protected_Self_Reference): Add guard to check for
index c46f66d..549d1b6 100644 (file)
@@ -4821,7 +4821,7 @@ package body Checks is
               Suppress  => All_Checks);
 
          --  Only remaining possibility is that the source is signed and
-         --  the target is unsigned
+         --  the target is unsigned.
 
          else
             pragma Assert (not Is_Unsigned_Type (Source_Base_Type)
@@ -5484,6 +5484,7 @@ package body Checks is
          return Scope_Suppress (Overflow_Check);
       end if;
    end Overflow_Checks_Suppressed;
+
    -----------------------------
    -- Range_Checks_Suppressed --
    -----------------------------
index 106acec..bc2b7a7 100644 (file)
@@ -8274,6 +8274,30 @@ package body Sem_Ch3 is
       ----------------
 
       procedure Post_Error is
+
+         procedure Missing_Body;
+         --  Output missing body message
+
+         ------------------
+         -- Missing_Body --
+         ------------------
+
+         procedure Missing_Body is
+         begin
+            --  Spec is in same unit, so we can post on spec
+
+            if In_Same_Source_Unit (Body_Id, E) then
+               Error_Msg_N ("missing body for &", E);
+
+            --  Spec is in a separate unit, so we have to post on the body
+
+            else
+               Error_Msg_NE ("missing body for & declared#!", Body_Id, E);
+            end if;
+         end Missing_Body;
+
+      --  Start of processing for Post_Error
+
       begin
          if not Comes_From_Source (E) then
 
@@ -8363,13 +8387,12 @@ package body Sem_Ch3 is
                         Check_Type_Conformant (Candidate, E);
 
                      else
-                        Error_Msg_NE ("missing body for & declared#!",
-                           Body_Id, E);
+                        Missing_Body;
                      end if;
                   end;
+
                else
-                  Error_Msg_NE ("missing body for & declared#!",
-                     Body_Id, E);
+                  Missing_Body;
                end if;
             end if;
          end if;
index 91f7647..c6579f1 100644 (file)
@@ -2242,10 +2242,12 @@ package VMS_Data is
                                                "-gnaty-n "                 &
                                             "ORDERED_SUBPROGRAMS "         &
                                                "-gnatyo "                  &
-                                            "OVERRIDING_INDICATORS "       &
-                                               "-gnatyO "                  &
                                             "NOORDERED_SUBPROGRAMS "       &
                                                "-gnaty-o "                 &
+                                            "OVERRIDING_INDICATORS "       &
+                                               "-gnatyO "                  &
+                                            "NOOVERRIDING_INDICATORS "     &
+                                               "-gnaty-O "                 &
                                             "PRAGMA "                      &
                                                "-gnatyp "                  &
                                             "NOPRAGMA "                    &
@@ -2485,6 +2487,12 @@ package VMS_Data is
    --                           in the ordering (e.g. Junk2 comes before
    --                           Junk10).
    --
+   --      OVERRIDING_INDICATORS Check that overriding subprograms are
+   --                           explicitly marked as such. The declaration of
+   --                           a primitive operation of a type extension that
+   --                           overrides an inherited operation must carry
+   --                           an overriding indicator.
+   --
    --      PRAGMA               Check pragma casing.
    --                           Pragma names must be written in mixed case,
    --                           that is, the initial letter and any letter