diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-20 15:43:11 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-20 15:43:11 +0000 |
commit | d39cadc692de4139b1cfaa05aa5fa4f1c713bba1 (patch) | |
tree | db110bbbc9ab65618b70d615e6c675b9d6248c05 /gcc/ada/stylesw.adb | |
parent | f52767ac36185f976afd0875bd1c95808418c8cf (diff) | |
download | gcc-d39cadc692de4139b1cfaa05aa5fa4f1c713bba1.tar.gz |
2008-08-20 Ed Schonberg <schonberg@adacore.com>
* styleg-c.ads, styleg-c.adb (Missing_Overriding): new procedure to
implement style check that overriding operations are explicitly marked
at such.
* style.ads (Missing_Overriding): new procedure that provides interface
to previous one.
* stylesw.ads, stylesw.adb: New style switch -gnatyO, to enable check
that the declaration or body of overriding operations carries an
explicit overriding indicator.
* sem_ch8.adb
(Analyze_Subprogram_Renaming): if operation is overriding, check whether
explicit indicator should be present.
* sem_ch6.adb (Verify_Overriding_Indicator,
Check_Overriding_Indicator): If operation is overriding, check whether
declaration and/or body of subprogram should be present
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139316 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/stylesw.adb')
-rw-r--r-- | gcc/ada/stylesw.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb index 34688df9c32..764d9af80e9 100644 --- a/gcc/ada/stylesw.adb +++ b/gcc/ada/stylesw.adb @@ -49,6 +49,7 @@ package body Stylesw is Style_Check_Layout := False; Style_Check_Max_Line_Length := False; Style_Check_Max_Nesting_Level := False; + Style_Check_Missing_Overriding := False; Style_Check_Mode_In := False; Style_Check_Order_Subprograms := False; Style_Check_Pragma_Casing := False; @@ -123,6 +124,7 @@ package body Stylesw is Add ('l', Style_Check_Layout); Add ('n', Style_Check_Standard); Add ('o', Style_Check_Order_Subprograms); + Add ('O', Style_Check_Missing_Overriding); Add ('p', Style_Check_Pragma_Casing); Add ('r', Style_Check_References); Add ('s', Style_Check_Specs); @@ -370,6 +372,9 @@ package body Stylesw is when 'o' => Style_Check_Order_Subprograms := True; + when 'O' => + Style_Check_Missing_Overriding := True; + when 'p' => Style_Check_Pragma_Casing := True; |