[multiple changes]

2010-09-10  Vincent Celier  <celier@adacore.com>

	* sem_aggr.adb, exp_prag.adb, sem_ch3.adb, exp_attr.adb,
	sem_res.adb, sem_attr.adb, sem_elab.adb, sem_ch4.adb, exp_disp.adb,
	exp_aggr.adb, exp_dist.adb: Change all mentions of "at run-time" to
	"at run time" in comments and error/warning messages.

2010-09-10  Ed Schonberg  <schonberg@adacore.com>

	* exp_cg.adb: Handle properly bodies without specs.

2010-09-10  Emmanuel Briot  <briot@adacore.com>

	* prj-nmsc.adb (Find_Source_Dirs): When a source directory is not
	present, and the user requested to either ignore this or display a
	warning (as opposed to an error), we still need to register the
	directory.

From-SVN: r164184
This commit is contained in:
Arnaud Charlet 2010-09-10 16:48:41 +02:00
parent 9096633797
commit e7c0dd3985
14 changed files with 51 additions and 25 deletions

View File

@ -1,3 +1,21 @@
2010-09-10 Vincent Celier <celier@adacore.com>
* sem_aggr.adb, exp_prag.adb, sem_ch3.adb, exp_attr.adb,
sem_res.adb, sem_attr.adb, sem_elab.adb, sem_ch4.adb, exp_disp.adb,
exp_aggr.adb, exp_dist.adb: Change all mentions of "at run-time" to
"at run time" in comments and error/warning messages.
2010-09-10 Ed Schonberg <schonberg@adacore.com>
* exp_cg.adb: Handle properly bodies without specs.
2010-09-10 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Find_Source_Dirs): When a source directory is not
present, and the user requested to either ignore this or display a
warning (as opposed to an error), we still need to register the
directory.
2010-09-10 Robert Dewar <dewar@adacore.com>
* errout.adb: Remove tests of Parsing_Main_Subunit, since this test is

View File

@ -4946,7 +4946,7 @@ package body Exp_Aggr is
end if;
-- If the semantic analyzer has determined that aggregate N will raise
-- Constraint_Error at run-time, then the aggregate node has been
-- Constraint_Error at run time, then the aggregate node has been
-- replaced with an N_Raise_Constraint_Error node and we should
-- never get here.

View File

@ -5520,7 +5520,7 @@ package body Exp_Attr is
-- that appear in GNAT's library, but will generate calls via rtsfind
-- to library routines for user code.
-- ??? For now, disable this code for JVM, since this generates a
-- VerifyError exception at run-time on e.g. c330001.
-- VerifyError exception at run time on e.g. c330001.
-- This is disabled for AAMP, to avoid making dependences on files not
-- supported in the AAMP library (such as s-fileio.adb).

View File

@ -432,7 +432,9 @@ package body Exp_CG is
-- entity of the construct. For a subprogram, it is the entity of the
-- spec, which carries a homonym counter when it is overloaded.
if Nkind (P) = N_Subprogram_Body then
if Nkind (P) = N_Subprogram_Body
and then not Acts_As_Spec (P)
then
Get_External_Name (Corresponding_Spec (P), Has_Suffix => False);
else

View File

@ -3681,7 +3681,7 @@ package body Exp_Disp is
-- Calculate the number of slots of the dispatch table. If the number
-- of primitives of Typ is 0 we reserve a dummy single entry for its
-- DT because at run-time the pointer to this dummy entry will be
-- DT because at run time the pointer to this dummy entry will be
-- used as the tag.
if Num_Iface_Prims = 0 then
@ -5095,7 +5095,7 @@ package body Exp_Disp is
Is_Library_Level_Tagged_Type (Typ));
-- The table of interfaces is not constant; its slots are
-- filled at run-time by the IP routine using attribute
-- filled at run time by the IP routine using attribute
-- 'Position to know the location of the tag components
-- (and this attribute cannot be safely used before the
-- object is initialized).

View File

@ -8769,7 +8769,7 @@ package body Exp_Dist is
-- Struct_Counter should be reset before
-- handling a variant part. Indeed only one
-- of the case statement alternatives will be
-- executed at run-time, so the counter must
-- executed at run time, so the counter must
-- start at 0 for every case statement.
Struct_Counter := 0;
@ -9655,7 +9655,7 @@ package body Exp_Dist is
-- Struct_Counter should be reset before
-- handling a variant part. Indeed only one
-- of the case statement alternatives will be
-- executed at run-time, so the counter must
-- executed at run time, so the counter must
-- start at 0 for every case statement.
Struct_Counter := 0;

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -392,7 +392,7 @@ package body Exp_Prag is
then
return;
elsif Nam = Name_Assertion then
Error_Msg_N ("?assertion will fail at run-time", N);
Error_Msg_N ("?assertion will fail at run time", N);
else
Error_Msg_N ("?check will fail at run time", N);
end if;

View File

@ -5208,6 +5208,7 @@ package body Prj.Nmsc is
Resolve_Links =>
Opt.Follow_Links_For_Dirs,
Case_Sensitive => True);
Has_Error : Boolean := False;
begin
if Root_Dir'Length = 0 then
@ -5215,8 +5216,10 @@ package body Prj.Nmsc is
Error_Or_Warning
(Data.Flags, Data.Flags.Missing_Source_Files,
"{ is not a valid directory.", Location, Project);
Has_Error := Data.Flags.Missing_Source_Files = Error;
end if;
else
if not Has_Error then
-- We have an existing directory, we register it and all of
-- its subdirectories.
@ -5240,6 +5243,7 @@ package body Prj.Nmsc is
declare
Path_Name : Path_Information;
Dir_Exists : Boolean;
Has_Error : Boolean := False;
begin
Locate_Directory
@ -5255,8 +5259,10 @@ package body Prj.Nmsc is
Error_Or_Warning
(Data.Flags, Data.Flags.Missing_Source_Files,
"{ is not a valid directory", Location, Project);
Has_Error := Data.Flags.Missing_Source_Files = Error;
end if;
else
if not Has_Error then
-- links have been resolved if necessary, and Path_Name
-- always ends with a directory separator
Add_To_Or_Remove_From_Source_Dirs

View File

@ -569,7 +569,7 @@ package body Sem_Aggr is
Set_Raises_Constraint_Error (N);
Error_Msg_N ("sub-aggregate low bound mismatch?", N);
Error_Msg_N
("\Constraint_Error will be raised at run-time?", N);
("\Constraint_Error will be raised at run time?", N);
end if;
end if;
@ -583,7 +583,7 @@ package body Sem_Aggr is
Set_Raises_Constraint_Error (N);
Error_Msg_N ("sub-aggregate high bound mismatch?", N);
Error_Msg_N
("\Constraint_Error will be raised at run-time?", N);
("\Constraint_Error will be raised at run time?", N);
end if;
end if;
end if;
@ -1255,7 +1255,7 @@ package body Sem_Aggr is
if OK_BH and then OK_AH and then Val_BH < Val_AH then
Set_Raises_Constraint_Error (N);
Error_Msg_N ("upper bound out of range?", AH);
Error_Msg_N ("\Constraint_Error will be raised at run-time?", AH);
Error_Msg_N ("\Constraint_Error will be raised at run time?", AH);
-- You need to set AH to BH or else in the case of enumerations
-- indices we will not be able to resolve the aggregate bounds.
@ -1298,13 +1298,13 @@ package body Sem_Aggr is
if OK_L and then Val_L > Val_AL then
Set_Raises_Constraint_Error (N);
Error_Msg_N ("lower bound of aggregate out of range?", N);
Error_Msg_N ("\Constraint_Error will be raised at run-time?", N);
Error_Msg_N ("\Constraint_Error will be raised at run time?", N);
end if;
if OK_H and then Val_H < Val_AH then
Set_Raises_Constraint_Error (N);
Error_Msg_N ("upper bound of aggregate out of range?", N);
Error_Msg_N ("\Constraint_Error will be raised at run-time?", N);
Error_Msg_N ("\Constraint_Error will be raised at run time?", N);
end if;
end Check_Bounds;
@ -1344,7 +1344,7 @@ package body Sem_Aggr is
if Range_Len < Len then
Set_Raises_Constraint_Error (N);
Error_Msg_N ("too many elements?", N);
Error_Msg_N ("\Constraint_Error will be raised at run-time?", N);
Error_Msg_N ("\Constraint_Error will be raised at run time?", N);
end if;
end Check_Length;

View File

@ -6392,7 +6392,7 @@ package body Sem_Attr is
-- Note: for the folding case, it is fine to treat Machine_Rounding
-- exactly the same way as Rounding, since this is one of the allowed
-- behaviors, and performance is not an issue here. It might be a bit
-- better to give the same result as it would give at run-time, even
-- better to give the same result as it would give at run time, even
-- though the non-determinism is certainly permitted.
when Attribute_Machine_Rounding =>

View File

@ -3148,7 +3148,7 @@ package body Sem_Ch3 is
-- A rather specialized test. If we see two tasks being declared
-- of the same type in the same object declaration, and the task
-- has an entry with an address clause, we know that program error
-- will be raised at run-time since we can't have two tasks with
-- will be raised at run time since we can't have two tasks with
-- entries at the same address.
if Is_Task_Type (Etype (Id)) and then More_Ids (N) then

View File

@ -3943,7 +3943,7 @@ package body Sem_Ch4 is
-- Check whether this is a component of the base type
-- which is absent from a statically constrained subtype.
-- This will raise constraint error at run-time, but is
-- This will raise constraint error at run time, but is
-- not a compile-time error. When the selector is illegal
-- for base type as well fall through and generate a
-- compilation error anyway.

View File

@ -2288,7 +2288,7 @@ package body Sem_Elab is
("task will be activated before elaboration of its body?",
Decl);
Error_Msg_N
("\Program_Error will be raised at run-time?", Decl);
("\Program_Error will be raised at run time?", Decl);
elsif
Present (Corresponding_Body (Unit_Declaration_Node (Proc)))

View File

@ -7126,7 +7126,7 @@ package body Sem_Res is
-- end Test;
-- In this case we have nothing else to do. The membership test will be
-- done at run-time.
-- done at run time.
elsif Ada_Version >= Ada_05
and then Is_Class_Wide_Type (Etype (L))
@ -8175,7 +8175,7 @@ package body Sem_Res is
-- the Sloc of the expression, not the original pragma.
Error_Msg_N
("?assertion would fail at run-time!",
("?assertion would fail at run time!",
Expression
(First (Pragma_Argument_Associations (Orig))));
end if;
@ -8201,7 +8201,7 @@ package body Sem_Res is
null;
else
Error_Msg_N
("?check would fail at run-time!",
("?check would fail at run time!",
Expression
(Last (Pragma_Argument_Associations (Orig))));
end if;
@ -8949,7 +8949,7 @@ package body Sem_Res is
-- The static analysis is not enough to know if the
-- interface is implemented or not. Hence we must pass
-- the work to the expander to generate code to evaluate
-- the conversion at run-time.
-- the conversion at run time.
Expand_Interface_Conversion (N, Is_Static => False);