summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_warn.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-07 16:15:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-07 16:15:57 +0000
commita57388e59d9b8b3653cdda4fdda843703df742ea (patch)
tree9c171f84305a0b31542ecb4136c605cc2fc2f573 /gcc/ada/sem_warn.adb
parent769e3ade50e884b74797d9f42bf907dc2d1abe7f (diff)
downloadgcc-a57388e59d9b8b3653cdda4fdda843703df742ea.tar.gz
2009-04-07 Thomas Quinot <quinot@adacore.com>
* g-sothco.ads (Int_Access): Remove extraneous access type (use anonymous access instead). (Get_Socket_From_Set): Fix incorrectly reverted formals Last and Socket to match the underlying C routine. * g-socket.adb (Get): Use named parameter associations instead of positional ones in call go Get_Socket_From_Set, since this routine has two formals of the same type. * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-socthi-mingw.ads, g-socthi.adb, g-socthi.ads: (C_Ioctl, Syscall_Ioctl): use "access C.int" instead of "Int_Access" for type of Arg formal. * sem_warn.adb: Minor reformatting 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Has_Tagged_Component): Fix typo in loop that iterates over record components. 2009-04-07 Nicolas Roche <roche@adacore.com> * gsocket.h: Don't include resolvLib.h on VxWorks 6 (kernel and rtp). This library has disappeared between VxWorks 6.4 and VxWorks 6.5 In RTP mode use time.h instead of times.h 2009-04-07 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Expand_N_Op_Concat): Improve lower bound handling 2009-04-07 Kevin Pouget <pouget@adacore.com> * exp_dist.adb: Modify Build_From_Any_Fonction procedure to correct expanded code for constrained types. 2009-04-07 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Overloaded_Selected_Component): implement AI05-105: in an object renaming declaration, anonymousness is a name resolution rule. sem_ch8.adb (Analyze_Object_Renaming): Ditto. 2009-04-07 Arnaud Charlet <charlet@adacore.com> * g-comlin.adb (Expansion): Fix old regression: also return directory names when matching. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_warn.adb')
-rw-r--r--gcc/ada/sem_warn.adb88
1 files changed, 44 insertions, 44 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index c29c6256e17..5e420c6e267 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1004,7 +1004,7 @@ package body Sem_Warn is
-- Do not output complaint about never being assigned a
-- value if a pragma Unmodified applies to the variable
-- we are examining, or if it is a parameter, if there is
- -- a pragma Unreferenced for the corresponding spec, of
+ -- a pragma Unreferenced for the corresponding spec, or
-- if the type is marked as having unreferenced objects.
-- The last is a little peculiar, but better too few than
-- too many warnings in this situation.
@@ -1026,7 +1026,7 @@ package body Sem_Warn is
-- has a separate declaration in a different unit. This
-- is the case where the client of a package sees only
-- the private type, and it may be quite reasonable
- -- for the logical view to be in out, even if the
+ -- for the logical view to be IN OUT, even if the
-- implementation ends up using access types or some
-- other method to achieve the local effect of a
-- modification. On the other hand if the spec and body
@@ -1050,10 +1050,10 @@ package body Sem_Warn is
then
null;
- -- Suppress warning if composite type containing any
- -- access element component, since the logical effect
- -- of modifying a parameter may be achieved by modifying
- -- a referenced entity.
+ -- Suppress warning if composite type contains any access
+ -- component, since the logical effect of modifying a
+ -- parameter may be achieved by modifying a referenced
+ -- object.
elsif Is_Composite_Type (E1T)
and then Has_Access_Values (E1T)
@@ -1237,7 +1237,7 @@ package body Sem_Warn is
-- If Referenced_As_LHS is set, then that's still interesting
-- (potential "assigned but never read" case), but not if we
- -- have pragma Unreferenced, which cancels this error.
+ -- have pragma Unreferenced, which cancels this warning.
and then (not Referenced_As_LHS_Check_Spec (E1)
or else not Has_Unreferenced (E1))
@@ -1253,13 +1253,13 @@ package body Sem_Warn is
(Check_Unreferenced_Formals and then Is_Formal (E1))
-- Case of warning on unread variables modified by an
- -- assignment, or an out parameter if it is the only one.
+ -- assignment, or an OUT parameter if it is the only one.
or else
(Warn_On_Modified_Unread
and then Referenced_As_LHS_Check_Spec (E1))
- -- Case of warning on any unread out parameter (note
+ -- Case of warning on any unread OUT parameter (note
-- such indications are only set if the appropriate
-- warning options were set, so no need to recheck here.
@@ -1285,11 +1285,11 @@ package body Sem_Warn is
or else
Is_Overloadable (E1)
- -- Package case, if the main unit is a package
- -- spec or generic package spec, then there may
- -- be a corresponding body that references this
- -- package in some other file. Otherwise we can
- -- be sure that there is no other reference.
+ -- Package case, if the main unit is a package spec
+ -- or generic package spec, then there may be a
+ -- corresponding body that references this package
+ -- in some other file. Otherwise we can be sure
+ -- that there is no other reference.
or else
(Ekind (E1) = E_Package
@@ -1314,7 +1314,7 @@ package body Sem_Warn is
and then
Referenced (Spec_Entity (E1)))
- -- Consider private type referenced if full view is referenced
+ -- Consider private type referenced if full view is referenced.
-- If there is not full view, this is a generic type on which
-- warnings are also useful.
@@ -1330,7 +1330,7 @@ package body Sem_Warn is
-- Eliminate dispatching operations from consideration, we
-- cannot tell if these are referenced or not in any easy
- -- manner (note this also catches Adjust/Finalize/Initialize)
+ -- manner (note this also catches Adjust/Finalize/Initialize).
and then not Is_Dispatching_Operation (E1)
@@ -1356,7 +1356,7 @@ package body Sem_Warn is
or else not Is_Task_Type (E1T))
-- For subunits, only place warnings on the main unit itself,
- -- since parent units are not completely compiled
+ -- since parent units are not completely compiled.
and then (Nkind (Unit (Cunit (Main_Unit))) /= N_Subunit
or else
@@ -1372,7 +1372,7 @@ package body Sem_Warn is
then
-- Suppress warnings in internal units if not in -gnatg mode
-- (these would be junk warnings for an applications program,
- -- since they refer to problems in internal units)
+ -- since they refer to problems in internal units).
if GNAT_Mode
or else not
@@ -1425,8 +1425,8 @@ package body Sem_Warn is
end if;
end if;
- -- Recurse into nested package or block. Do not recurse into a
- -- formal package, because the corresponding body is not analyzed.
+ -- Recurse into nested package or block. Do not recurse into a formal
+ -- package, because the corresponding body is not analyzed.
<<Continue>>
if (Is_Package_Or_Generic_Package (E1)
@@ -1484,7 +1484,7 @@ package body Sem_Warn is
function Prefix_Has_Dereference (Pref : Node_Id) return Boolean is
begin
- -- If prefix is of an access type, certainly need a dereference
+ -- If prefix is of an access type, it certainly needs a dereference
if Is_Access_Type (Etype (Pref)) then
return True;
@@ -1526,13 +1526,13 @@ package body Sem_Warn is
return;
end if;
- -- Otherwise see what kind of node we have. If the entity already
- -- has an unset reference, it is not necessarily the earliest in
- -- the text, because resolution of the prefix of selected components
- -- is completed before the resolution of the selected component itself.
- -- as a result, given (R /= null and then R.X > 0), the occurrences
- -- of R are examined in right-to-left order. If there is already an
- -- unset reference, we check whether N is earlier before proceeding.
+ -- Otherwise see what kind of node we have. If the entity already has an
+ -- unset reference, it is not necessarily the earliest in the text,
+ -- because resolution of the prefix of selected components is completed
+ -- before the resolution of the selected component itself. As a result,
+ -- given (R /= null and then R.X > 0), the occurrences of R are examined
+ -- in right-to-left order. If there is already an unset reference, we
+ -- check whether N is earlier before proceeding.
case Nkind (N) is
@@ -1560,11 +1560,11 @@ package body Sem_Warn is
-- component with default initialization. Both of these
-- cases can be ignored, since the actual object that is
-- referenced is definitely initialized. Note that this
- -- covers the case of reading discriminants of an out
+ -- covers the case of reading discriminants of an OUT
-- parameter, which is OK even in Ada 83.
-- Note that we are only interested in a direct reference to
- -- a record component here. If the reference is via an
+ -- a record component here. If the reference is through an
-- access type, then the access object is being referenced,
-- not the record, and still deserves an unset reference.
@@ -1622,9 +1622,9 @@ package body Sem_Warn is
SR := Scope (SR);
end loop;
- -- Case of reference has an access type. This is special
- -- case since access types are always set to null so
- -- cannot be truly uninitialized, but we still want to
+ -- Case of reference has an access type. This is a
+ -- special case since access types are always set to null
+ -- so cannot be truly uninitialized, but we still want to
-- warn about cases of obvious null dereference.
if Is_Access_Type (Typ) then
@@ -1634,7 +1634,7 @@ package body Sem_Warn is
function Process
(N : Node_Id) return Traverse_Result;
-- Process function for instantiation of Traverse
- -- below. Checks if N contains reference to other
+ -- below. Checks if N contains reference to E other
-- than a dereference.
function Ref_In (Nod : Node_Id) return Boolean;
@@ -1699,7 +1699,7 @@ package body Sem_Warn is
end if;
-- One more check, don't bother with references
- -- that are inside conditional statements or while
+ -- that are inside conditional statements or WHILE
-- loops if the condition references the entity in
-- question. This avoids most false positives.
@@ -1864,22 +1864,22 @@ package body Sem_Warn is
Pack : Entity_Id;
procedure Check_Inner_Package (Pack : Entity_Id);
- -- Pack is a package local to a unit in a with_clause. Both the
- -- unit and Pack are referenced. If none of the entities in Pack
- -- are referenced, then the only occurrence of Pack is in a use
- -- clause or a pragma, and a warning is worthwhile as well.
+ -- Pack is a package local to a unit in a with_clause. Both the unit
+ -- and Pack are referenced. If none of the entities in Pack are
+ -- referenced, then the only occurrence of Pack is in a USE clause
+ -- or a pragma, and a warning is worthwhile as well.
function Check_System_Aux return Boolean;
- -- Before giving a warning on a with_clause for System, check
- -- whether a system extension is present.
+ -- Before giving a warning on a with_clause for System, check wheter
+ -- a system extension is present.
function Find_Package_Renaming
(P : Entity_Id;
L : Entity_Id) return Entity_Id;
-- The only reference to a context unit may be in a renaming
- -- declaration. If this renaming declares a visible entity, do
- -- not warn that the context clause could be moved to the body,
- -- because the renaming may be intended to re-export the unit.
+ -- declaration. If this renaming declares a visible entity, do not
+ -- warn that the context clause could be moved to the body, because
+ -- the renaming may be intended to re-export the unit.
-------------------------
-- Check_Inner_Package --