Commit b8dfbe1e by Arnaud Charlet

[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
parent f18b55bd
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> 2009-11-30 Emmanuel Briot <briot@adacore.com>
* prj.adb, prj.ads, prj-nmsc.adb (Has_Multi_Unit_Sources): New field in * prj.adb, prj.ads, prj-nmsc.adb (Has_Multi_Unit_Sources): New field in
......
...@@ -20858,28 +20858,30 @@ Turn off the check for a specified rule with the specified parameter, if any. ...@@ -20858,28 +20858,30 @@ Turn off the check for a specified rule with the specified parameter, if any.
@cindex @option{-from} (@command{gnatcheck}) @cindex @option{-from} (@command{gnatcheck})
@item -from=@var{rule_option_filename} @item -from=@var{rule_option_filename}
Read the rule options from the text file @var{rule_option_filename}, referred as Read the rule options from the text file @var{rule_option_filename}, referred
``rule file'' below. to as a ``coding standard file'' below.
@end table @end table
@noindent @noindent
The default behavior is that all the rule checks are disabled. The default behavior is that all the rule checks are disabled.
A rule file is a text file containing a set of rule options. A coding standard file is a text file that contains a set of rule options
@cindex Rule file (for @code{gnatcheck}) described above.
@cindex Coding standard file (for @code{gnatcheck})
The file may contain empty lines and Ada-style comments (comment 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, lines and end-of-line comments). There can be several rule options on a
you do not have to start a new rule option on a new line. 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 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 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 from @file{@var{rule_file_2}}, and @file{@var{rule_file_2}} reads
(directly or indirectly) rule options from @file{@var{rule_file_1}}), (directly or indirectly) rule options from @file{@var{rule_file_1}}),
the processing of rule files is interrupted and a part of their content the processing of coding standard files is interrupted and a part of their
is ignored. content is ignored.
@node Adding the Results of Compiler Checks to gnatcheck Output @node Adding the Results of Compiler Checks to gnatcheck Output
...@@ -6833,12 +6833,15 @@ package body Prj.Nmsc is ...@@ -6833,12 +6833,15 @@ package body Prj.Nmsc is
exit when Last = 0; exit when Last = 0;
-- ??? Duplicate system call here, we just did a a -- In fast project loading mode (without -eL), the user
-- similar one. Maybe Ada.Directories would be more -- guarantees that no directory has a name which is a
-- appropriate here. -- valid source name, so we can avoid doing a system call
-- here. This provides a very significant speed up on
if Is_Regular_File -- slow file systems (remote files for instance).
(Source_Directory & Name (1 .. Last))
if not Opt.Follow_Links_For_Files
or else Is_Regular_File
(Source_Directory & Name (1 .. Last))
then then
if Current_Verbosity = High then if Current_Verbosity = High then
Write_Str (" Checking "); Write_Str (" Checking ");
......
...@@ -12511,8 +12511,8 @@ package body Sem_Ch3 is ...@@ -12511,8 +12511,8 @@ package body Sem_Ch3 is
then then
if No (Actual_Subp) then if No (Actual_Subp) then
Set_Alias (New_Subp, Visible_Subp); Set_Alias (New_Subp, Visible_Subp);
Set_Is_Abstract_Subprogram Set_Is_Abstract_Subprogram (New_Subp, True);
(New_Subp, True);
else else
-- If this is a derivation for an instance of a formal derived -- If this is a derivation for an instance of a formal derived
-- type, abstractness comes from the primitive operation of the -- type, abstractness comes from the primitive operation of the
......
...@@ -1008,6 +1008,7 @@ package body Sem_Disp is ...@@ -1008,6 +1008,7 @@ package body Sem_Disp is
and then not Is_Visibly_Controlled (Tagged_Type) and then not Is_Visibly_Controlled (Tagged_Type)
then then
Set_Is_Overriding_Operation (Subp, False); Set_Is_Overriding_Operation (Subp, False);
-- If the subprogram specification carries an overriding -- If the subprogram specification carries an overriding
-- indicator, no need for the warning: it is either redundant, -- indicator, no need for the warning: it is either redundant,
-- or else an error will be reported. -- or else an error will be reported.
...@@ -1018,10 +1019,14 @@ package body Sem_Disp is ...@@ -1018,10 +1019,14 @@ package body Sem_Disp is
or else Must_Not_Override (Parent (Subp))) or else Must_Not_Override (Parent (Subp)))
then then
null; null;
-- Here we need the warning
else else
Error_Msg_NE Error_Msg_NE
("operation does not override inherited&?", Subp, Subp); ("operation does not override inherited&?", Subp, Subp);
end if; end if;
else else
Override_Dispatching_Operation (Tagged_Type, Old_Subp, Subp); Override_Dispatching_Operation (Tagged_Type, Old_Subp, Subp);
Set_Is_Overriding_Operation (Subp); Set_Is_Overriding_Operation (Subp);
......
...@@ -38,10 +38,10 @@ procedure Usage is ...@@ -38,10 +38,10 @@ procedure Usage is
procedure Write_Switch_Char (Sw : String; Prefix : String := "gnat"); procedure Write_Switch_Char (Sw : String; Prefix : String := "gnat");
-- Output two spaces followed by the switch character minus followed -- Output two spaces followed by the switch character minus followed
-- Prefix, followed by the string given as the argument, and then -- Prefix, followed by the string given as the argument, and then enough
-- enough blanks to tab to column 13, i.e. assuming Sw is not longer -- blanks to tab to column 13, i.e. assuming Sw is not longer than 5
-- than 5 characters, the maximum allowed, Write_Switch_Char will -- characters, the maximum allowed, Write_Switch_Char will always output
-- always output exactly 12 characters. -- exactly 12 characters.
----------------------- -----------------------
-- Write_Switch_Char -- -- Write_Switch_Char --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment