diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 15:23:25 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-08 15:23:25 +0000 |
commit | fc75802adc763956992cceb1c25ca375f96975f6 (patch) | |
tree | 8eb92b7458d7ee0184d5e855ea6ed73771a7a43a | |
parent | c429965c31b279c1b03bdfdcae996983cf06632e (diff) | |
download | gcc-fc75802adc763956992cceb1c25ca375f96975f6.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145749 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 31 | ||||
-rw-r--r-- | gcc/ada/vms_data.ads | 12 |
4 files changed, 53 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b02ec43597d..3a6edf9783e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index c46f66d392a..549d1b61b94 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -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 -- ----------------------------- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 106acec064e..bc2b7a7e2f0 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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; diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index 91f7647a411..c6579f1cc28 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -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 |