* 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
+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
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)
return Scope_Suppress (Overflow_Check);
end if;
end Overflow_Checks_Suppressed;
+
-----------------------------
-- Range_Checks_Suppressed --
-----------------------------
----------------
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
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;
"-gnaty-n " &
"ORDERED_SUBPROGRAMS " &
"-gnatyo " &
- "OVERRIDING_INDICATORS " &
- "-gnatyO " &
"NOORDERED_SUBPROGRAMS " &
"-gnaty-o " &
+ "OVERRIDING_INDICATORS " &
+ "-gnatyO " &
+ "NOOVERRIDING_INDICATORS " &
+ "-gnaty-O " &
"PRAGMA " &
"-gnatyp " &
"NOPRAGMA " &
-- 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