diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 14:29:41 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 14:29:41 +0100 |
commit | b8dfbe1ea53e170d62f90f696d40d27faf060183 (patch) | |
tree | 7ed3c6ec39b1e711704c661c80402e8d4d2c8b40 /gcc/ada | |
parent | f18b55bdc2a180fa4a981ceaa8604660d6fa958b (diff) | |
download | gcc-b8dfbe1ea53e170d62f90f696d40d27faf060183.zip gcc-b8dfbe1ea53e170d62f90f696d40d27faf060183.tar.gz gcc-b8dfbe1ea53e170d62f90f696d40d27faf060183.tar.bz2 |
[multiple changes]
2009-11-30 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, sem_disp.adb, usage.adb: Minor reformatting
2009-11-30 Vasiliy Fofanov <fofanov@adacore.com>
* gnat_ugn.texi: Minor editing.
2009-11-30 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Search_Directories): when -eL was not specified, assume
that no directory matches the naming scheme for sources.
From-SVN: r154795
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 22 | ||||
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 15 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_disp.adb | 5 | ||||
-rw-r--r-- | gcc/ada/usage.adb | 8 |
6 files changed, 45 insertions, 22 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 5b55b1c..9d9ddb8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,16 @@ +2009-11-30 Robert Dewar <dewar@adacore.com> + + * sem_ch3.adb, sem_disp.adb, usage.adb: Minor reformatting + +2009-11-30 Vasiliy Fofanov <fofanov@adacore.com> + + * gnat_ugn.texi: Minor editing. + +2009-11-30 Emmanuel Briot <briot@adacore.com> + + * prj-nmsc.adb (Search_Directories): when -eL was not specified, assume + that no directory matches the naming scheme for sources. + 2009-11-30 Emmanuel Briot <briot@adacore.com> * prj.adb, prj.ads, prj-nmsc.adb (Has_Multi_Unit_Sources): New field in diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 70b02c9..c8b8310 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -20858,28 +20858,30 @@ Turn off the check for a specified rule with the specified parameter, if any. @cindex @option{-from} (@command{gnatcheck}) @item -from=@var{rule_option_filename} -Read the rule options from the text file @var{rule_option_filename}, referred as -``rule file'' below. +Read the rule options from the text file @var{rule_option_filename}, referred +to as a ``coding standard file'' below. @end table @noindent The default behavior is that all the rule checks are disabled. -A rule file is a text file containing a set of rule options. -@cindex Rule file (for @code{gnatcheck}) +A coding standard file is a text file that contains a set of rule options +described above. +@cindex Coding standard file (for @code{gnatcheck}) The file may contain empty lines and Ada-style comments (comment -lines and end-of-line comments). The rule file has free format; that is, -you do not have to start a new rule option on a new line. +lines and end-of-line comments). There can be several rule options on a +single line (separated by a space). -A rule file may contain other @option{-from=@var{rule_option_filename}} +A coding standard file may reference other coding standard files by including +other @option{-from=@var{rule_option_filename}} options, each such option being replaced with the content of the -corresponding rule file during the rule files processing. In case a +corresponding coding standard file during processing. In case a cycle is detected (that is, @file{@var{rule_file_1}} reads rule options from @file{@var{rule_file_2}}, and @file{@var{rule_file_2}} reads (directly or indirectly) rule options from @file{@var{rule_file_1}}), -the processing of rule files is interrupted and a part of their content -is ignored. +the processing of coding standard files is interrupted and a part of their +content is ignored. @node Adding the Results of Compiler Checks to gnatcheck Output diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index b56d05f..1f7c5e4 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -6833,12 +6833,15 @@ package body Prj.Nmsc is exit when Last = 0; - -- ??? Duplicate system call here, we just did a a - -- similar one. Maybe Ada.Directories would be more - -- appropriate here. - - if Is_Regular_File - (Source_Directory & Name (1 .. Last)) + -- In fast project loading mode (without -eL), the user + -- guarantees that no directory has a name which is a + -- valid source name, so we can avoid doing a system call + -- here. This provides a very significant speed up on + -- slow file systems (remote files for instance). + + if not Opt.Follow_Links_For_Files + or else Is_Regular_File + (Source_Directory & Name (1 .. Last)) then if Current_Verbosity = High then Write_Str (" Checking "); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index a95c7fa..1717aec 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -12511,8 +12511,8 @@ package body Sem_Ch3 is then if No (Actual_Subp) then Set_Alias (New_Subp, Visible_Subp); - Set_Is_Abstract_Subprogram - (New_Subp, True); + Set_Is_Abstract_Subprogram (New_Subp, True); + else -- If this is a derivation for an instance of a formal derived -- type, abstractness comes from the primitive operation of the diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 2ee5a80..9c9da62 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -1008,6 +1008,7 @@ package body Sem_Disp is and then not Is_Visibly_Controlled (Tagged_Type) then Set_Is_Overriding_Operation (Subp, False); + -- If the subprogram specification carries an overriding -- indicator, no need for the warning: it is either redundant, -- or else an error will be reported. @@ -1018,10 +1019,14 @@ package body Sem_Disp is or else Must_Not_Override (Parent (Subp))) then null; + + -- Here we need the warning + else Error_Msg_NE ("operation does not override inherited&?", Subp, Subp); end if; + else Override_Dispatching_Operation (Tagged_Type, Old_Subp, Subp); Set_Is_Overriding_Operation (Subp); diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index 541496c..c5caa46 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -38,10 +38,10 @@ procedure Usage is procedure Write_Switch_Char (Sw : String; Prefix : String := "gnat"); -- Output two spaces followed by the switch character minus followed - -- Prefix, followed by the string given as the argument, and then - -- enough blanks to tab to column 13, i.e. assuming Sw is not longer - -- than 5 characters, the maximum allowed, Write_Switch_Char will - -- always output exactly 12 characters. + -- Prefix, followed by the string given as the argument, and then enough + -- blanks to tab to column 13, i.e. assuming Sw is not longer than 5 + -- characters, the maximum allowed, Write_Switch_Char will always output + -- exactly 12 characters. ----------------------- -- Write_Switch_Char -- |