2014-07-17 Robert Dewar <dewar@adacore.com>
* sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
From-SVN: r212726
23 files changed:
+2014-07-17 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
+ einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
+ repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
+ sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
+ treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
+
2014-07-17 Robert Dewar <dewar@adacore.com>
* debug.adb: Remove -gnatdQ.
2014-07-17 Robert Dewar <dewar@adacore.com>
* debug.adb: Remove -gnatdQ.
-- --
-- S p e c --
-- --
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
- -- in front of the LM, not after it. A bit of a kludge, but it works.
+ -- in front of the LM, not after it. A little odd, but it works.
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
-- --
-- S p e c --
-- --
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
- -- in front of the LM, not after it. A bit of a kludge, but it works.
+ -- in front of the LM, not after it. A bit odd, but it works.
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
-- --
-- S p e c --
-- --
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
-- there is no convenient way of backing up more than one character,
-- what we do is to leave ourselves positioned past the LM, but set
-- this flag, so that we know that from an Ada point of view we are
- -- in front of the LM, not after it. A bit of a kludge, but it works.
+ -- in front of the LM, not after it. A bit odd, but it works.
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
Before_LM_PM : Boolean := False;
-- This flag similarly handles the case of being physically positioned
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
-- True at start of string, and after an underline character
begin
-- True at start of string, and after an underline character
begin
- -- A special kludge, consider SPARK_Mode to be mixed case
+ -- A special exception, consider SPARK_Mode to be mixed case
if Ident = "SPARK_Mode" then
return Mixed_Case;
if Ident = "SPARK_Mode" then
return Mixed_Case;
-- --
-- S p e c --
-- --
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
-- equivalent to Set_Casing (All_Upper_Case).
function Determine_Casing (Ident : Text_Buffer) return Casing_Type;
-- equivalent to Set_Casing (All_Upper_Case).
function Determine_Casing (Ident : Text_Buffer) return Casing_Type;
- -- Determines the casing of the identifier/keyword string Ident
+ -- Determines the casing of the identifier/keyword string Ident. A special
+ -- test is made for SPARK_Mode which is considered to be mixed case, since
+ -- this gives a better general behavior.
PV := Duplicate_Subexpr_No_Checks (Exp, Name_Req => False);
PV := Duplicate_Subexpr_No_Checks (Exp, Name_Req => False);
- -- A rather specialized kludge. If PV is an analyzed expression
- -- which is an indexed component of a packed array that has not
- -- been properly expanded, turn off its Analyzed flag to make sure
- -- it gets properly reexpanded.
+ -- A rather specialized test. If PV is an analyzed expression which
+ -- is an indexed component of a packed array that has not been
+ -- properly expanded, turn off its Analyzed flag to make sure it
+ -- gets properly reexpanded.
-- The reason this arises is that Duplicate_Subexpr_No_Checks did
-- an analyze with the old parent pointer. This may point e.g. to
-- The reason this arises is that Duplicate_Subexpr_No_Checks did
-- an analyze with the old parent pointer. This may point e.g. to
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
- -- is legitimate. We deal with this by a nasty kludge that knows that the
- -- value is always known static for discrete types (and no other types can
- -- have an RM_Size value of zero).
+ -- is legitimate. We deal with this by a considering that the value is
+ -- always known static for discrete types (and no other types can have
+ -- an RM_Size value of zero).
-- In two cases, Known_Static_Esize and Known_Static_RM_Size, there is one
-- more consideration, which is that we always return False for generic
-- In two cases, Known_Static_Esize and Known_Static_RM_Size, there is one
-- more consideration, which is that we always return False for generic
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
-- It would be cleaner to use No_Uint in all these cases, but historically
-- we chose to use Uint_0 at first, and the change over will take time ???
-- This is particularly true for the RM_Size field, where a value of zero
- -- is legitimate and causes some kludges around the code.
+ -- is legitimate and causes some special tests around the code.
-- Contrary to the corresponding Set procedures above, these routines
-- do NOT check the entity kind of their argument, instead they set the
-- Contrary to the corresponding Set procedures above, these routines
-- do NOT check the entity kind of their argument, instead they set the
Assoc := Expression (Assoc);
end if;
Assoc := Expression (Assoc);
end if;
- -- If the located association directly denotes a
- -- discriminant, then use the value of a saved
- -- association of the aggregate. This is a kludge to
- -- handle certain cases involving multiple discriminants
- -- mapped to a single discriminant of a descendant. It's
- -- not clear how to locate the appropriate discriminant
- -- value for such cases. ???
+ -- If the located association directly denotes
+ -- a discriminant, then use the value of a saved
+ -- association of the aggregate. This is an approach
+ -- used to handle certain cases involving multiple
+ -- discriminants mapped to a single discriminant of
+ -- a descendant. It's not clear how to locate the
+ -- appropriate discriminant value for such cases. ???
if Is_Entity_Name (Assoc)
and then Ekind (Entity (Assoc)) = E_Discriminant
if Is_Entity_Name (Assoc)
and then Ekind (Entity (Assoc)) = E_Discriminant
-- Detect the following code in System.Finalization_Masters only on
-- .NET/JVM targets:
-- Detect the following code in System.Finalization_Masters only on
-- .NET/JVM targets:
-- procedure Finalize (Master : in out Finalization_Master) is
-- begin
-- . . .
-- begin
-- Finalize (Curr_Ptr.all);
-- procedure Finalize (Master : in out Finalization_Master) is
-- begin
-- . . .
-- begin
-- Finalize (Curr_Ptr.all);
-- Since .NET/JVM compilers lack address arithmetic and Deep_Finalize
-- Since .NET/JVM compilers lack address arithmetic and Deep_Finalize
- -- cannot be named in library or user code, the compiler has to install
- -- a kludge and transform the call to Finalize into Deep_Finalize.
+ -- cannot be named in library or user code, the compiler has to deal
+ -- with this by transforming the call to Finalize into Deep_Finalize.
if VM_Target /= No_VM
and then Chars (Subp) = Name_Finalize
if VM_Target /= No_VM
and then Chars (Subp) = Name_Finalize
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
Append_To (Decls, RPC_Receiver_Decl);
else
Append_To (Decls, RPC_Receiver_Decl);
else
- -- Kludge, requires comment???
+ -- Comments required here???
RPC_Receiver_Decl := Last (Decls);
end if;
RPC_Receiver_Decl := Last (Decls);
end if;
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2014, 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- --
-- --
-- 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- --
-- generating spurious errors caused by the use of Integer_Address'Value
-- in our implementation of Ada.Tags.Internal_Tag
-- generating spurious errors caused by the use of Integer_Address'Value
-- in our implementation of Ada.Tags.Internal_Tag
- -- Seems like a bit of a kludge, there should be a better way ???
+ -- Seems like a bit of a odd approach, there should be a better way ???
- -- There is a better way, you should also test RTE_Available ???
+ -- There is a better way, test RTE_Available ???
if No_Run_Time_Mode
and then Rtyp = RTE (RE_Integer_Address)
if No_Run_Time_Mode
and then Rtyp = RTE (RE_Integer_Address)
- -- We have a pretty bad kludge here. Suppose Rec is subtype
- -- being defined in a subprogram that's created as part of
- -- the freezing of Rec'Base. In that case, we know that
- -- Comp'Base must have already been frozen by the time we
- -- get to elaborate this because Gigi doesn't elaborate any
- -- bodies until it has elaborated all of the declarative
+ -- We have a difficult case to handle here. Suppose Rec is
+ -- subtype being defined in a subprogram that's created as
+ -- part of the freezing of Rec'Base. In that case, we know
+ -- that Comp'Base must have already been frozen by the time
+ -- we get to elaborate this because Gigi doesn't elaborate
+ -- any bodies until it has elaborated all of the declarative
-- part. But Is_Frozen will not be set at this point because
-- we are processing code in lexical order.
-- part. But Is_Frozen will not be set at this point because
-- we are processing code in lexical order.
-- Since we don't want T to have a Freeze_Node, we don't want its
-- Full_View or Corresponding_Record_Type to have one either.
-- Since we don't want T to have a Freeze_Node, we don't want its
-- Full_View or Corresponding_Record_Type to have one either.
- -- ??? Fundamentally, this whole handling is a kludge. What we really
+ -- ??? Fundamentally, this whole handling is unpleasant. What we really
-- want is to be sure that for an Itype that's part of record R and is a
-- subtype of type T, that it's frozen after the later of the freeze
-- points of R and T. We have no way of doing that directly, so what we
-- want is to be sure that for an Itype that's part of record R and is a
-- subtype of type T, that it's frozen after the later of the freeze
-- points of R and T. We have no way of doing that directly, so what we
elsif (K = N_Selected_Component or else K = N_Indexed_Component)
and then Prefix (P) = N
then
elsif (K = N_Selected_Component or else K = N_Indexed_Component)
and then Prefix (P) = N
then
- -- Check for access type. First a kludge, In some cases this is
- -- called too early (see comments in Sem_Ch8.Find_Direct_Name),
+ -- Check for access type. First a special test, In some cases
+ -- this is called too early (see comments in Find_Direct_Name),
-- at a point where the tree is not fully typed yet. In that
-- case we may lack an Etype for N, and we can't check the
-- Etype. For now, we always return False in such a case,
-- at a point where the tree is not fully typed yet. In that
-- case we may lack an Etype for N, and we can't check the
-- Etype. For now, we always return False in such a case,
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
- -- An interesting little kludge. If the previous token is a semicolon,
+ -- An interesting little case. If the previous token is a semicolon,
-- then there is no way that we can legitimately need another semicolon.
-- then there is no way that we can legitimately need another semicolon.
- -- This could only arise in an error situation where an error has
- -- already been signalled. By simply ignoring the request for a
- -- semicolon in this case, we avoid some spurious missing semicolon
- -- messages.
+ -- This could only arise in an situation where an error has already been
+ -- signalled. By simply ignoring the request for a semicolon in this
+ -- case, we avoid some spurious missing semicolon messages.
elsif Prev_Token = Tok_Semicolon then
return;
elsif Prev_Token = Tok_Semicolon then
return;
- -- An interesting little kludge here. If the previous token is a
+ -- An interesting little test here. If the previous token is a
-- semicolon, then there is no way that we can legitimately need
-- another semicolon. This could only arise in an error situation
-- where an error has already been signalled. By simply ignoring
-- semicolon, then there is no way that we can legitimately need
-- another semicolon. This could only arise in an error situation
-- where an error has already been signalled. By simply ignoring
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1999-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2014, 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- --
-- --
-- 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- --
UI_Write (Fbit);
Write_Str (" .. ");
UI_Write (Fbit);
Write_Str (" .. ");
- -- Allowing Uint_0 here is a kludge, really this should be a
- -- fine Esize value but currently it means unknown, except that
- -- we know after gigi has back annotated that a size of zero is
- -- real, since otherwise gigi back annotates using No_Uint as
- -- the value to indicate unknown).
+ -- Allowing Uint_0 here is an annoying special case. Really this
+ -- should be a fine Esize value but currently it means unknown,
+ -- except that we know after gigi has back annotated that a size
+ -- of zero is real, since otherwise gigi back annotates using
+ -- No_Uint as the value to indicate unknown).
if (Esize (Comp) = Uint_0 or else Known_Static_Esize (Comp))
and then Known_Static_Normalized_First_Bit (Comp)
if (Esize (Comp) = Uint_0 or else Known_Static_Esize (Comp))
and then Known_Static_Normalized_First_Bit (Comp)
- -- The test for Esize (Comp) not being Uint_0 here is a kludge.
- -- Officially a value of zero for Esize means unknown, but here
- -- we use the fact that we know that gigi annotates Esize with
- -- No_Uint, not Uint_0. Really everyone should use No_Uint???
+ -- The test for Esize (Comp) not Uint_0 here is an annoying
+ -- special case. Officially a value of zero for Esize means
+ -- unknown, but here we use the fact that we know that gigi
+ -- annotates Esize with No_Uint, not Uint_0. Really everyone
+ -- should use No_Uint???
elsif List_Representation_Info < 3
or else (Esize (Comp) /= Uint_0 and then Unknown_Esize (Comp))
elsif List_Representation_Info < 3
or else (Esize (Comp) /= Uint_0 and then Unknown_Esize (Comp))
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
Boolean'Pos (Most_Significant_Word /= 2) +
Boolean'Pos (Most_Significant_Word = 2);
-- Factor that the extracted exponent needs to be divided by to be in
Boolean'Pos (Most_Significant_Word /= 2) +
Boolean'Pos (Most_Significant_Word = 2);
-- Factor that the extracted exponent needs to be divided by to be in
- -- range 0 .. IEEE_Emax - IEEE_Emin + 2. Special kludge: Exponent_Factor
- -- is 1 for x86/IA64 double extended as GCC adds unused bits to the
- -- type.
+ -- range 0 .. IEEE_Emax - IEEE_Emin + 2. Special case: Exponent_Factor
+ -- is 1 for x86/IA64 double extended (GCC adds unused bits to the type).
Exponent_Mask : constant Float_Word :=
Float_Word (IEEE_Emax - IEEE_Emin + 2) *
Exponent_Mask : constant Float_Word :=
Float_Word (IEEE_Emax - IEEE_Emin + 2) *
begin
Check_SPARK_Restriction ("generic is not allowed", N);
begin
Check_SPARK_Restriction ("generic is not allowed", N);
- -- Very first thing: apply the special kludge for Text_IO processing
- -- in case we are instantiating one of the children of [Wide_]Text_IO.
+ -- Very first thing: check for Text_IO sp[ecial unit in case we are
+ -- instantiating one of the children of [[Wide_]Wide_]Text_IO.
Check_Text_IO_Special_Unit (Name (N));
Check_Text_IO_Special_Unit (Name (N));
begin
Check_SPARK_Restriction ("generic is not allowed", N);
begin
Check_SPARK_Restriction ("generic is not allowed", N);
- -- Very first thing: apply the special kludge for Text_IO processing
- -- in case we are instantiating one of the children of [Wide_]Text_IO.
- -- Of course such an instantiation is bogus (these are packages, not
- -- subprograms), but we get a better error message if we do this.
+ -- Very first thing: check for special Text_IO unit in case we are
+ -- instantiating one of the children of [[Wide_]Wide_]Text_IO. Of course
+ -- such an instantiation is bogus (these are packages, not subprograms),
+ -- but we get a better error message if we do this.
Check_Text_IO_Special_Unit (Gen_Id);
Check_Text_IO_Special_Unit (Gen_Id);
if Present (Formals) then
Push_Scope (Desig_Type);
if Present (Formals) then
Push_Scope (Desig_Type);
- -- A bit of a kludge here. These kludges will be removed when Itypes
- -- have proper parent pointers to their declarations???
+ -- Some special tests here. These special tests can be removed
+ -- if and when Itypes always have proper parent pointers to their
+ -- declarations???
- -- Kludge 1) Link defining_identifier of formals. Required by
+ -- Special test 1) Link defining_identifier of formals. Required by
-- First_Formal to provide its functionality.
declare
-- First_Formal to provide its functionality.
declare
Process_Formals (Formals, Parent (T_Def));
Process_Formals (Formals, Parent (T_Def));
- -- Kludge 2) End_Scope requires that the parent pointer be set to
- -- something reasonable, but Itypes don't have parent pointers. So
+ -- Special test 2) End_Scope requires that the parent pointer be set
+ -- to something reasonable, but Itypes don't have parent pointers. So
-- we set it and then unset it ???
Set_Parent (Desig_Type, T_Name);
-- we set it and then unset it ???
Set_Parent (Desig_Type, T_Name);
-- If ancestor has predicates then so does the subtype, and in addition
-- we must delay the freeze to properly arrange predicate inheritance.
-- If ancestor has predicates then so does the subtype, and in addition
-- we must delay the freeze to properly arrange predicate inheritance.
- -- The Ancestor_Type test is a big kludge, there seem to be cases in
- -- which T = ID, so the above tests and assignments do nothing???
+ -- The Ancestor_Type test is really unpleasant, there seem to be cases
+ -- in which T = ID, so the above tests and assignments do nothing???
if Has_Predicates (T)
or else (Present (Ancestor_Subtype (T))
if Has_Predicates (T)
or else (Present (Ancestor_Subtype (T))
or else Is_Incomplete_Or_Private_Type (Desig_Type))
and then not Is_Constrained (Desig_Type)
then
or else Is_Incomplete_Or_Private_Type (Desig_Type))
and then not Is_Constrained (Desig_Type)
then
- -- ??? The following code is a temporary kludge to ignore a
+ -- ??? The following code is a temporary bypass to ignore a
-- discriminant constraint on access type if it is constraining
-- the current record. Avoid creating the implicit subtype of the
-- record we are currently compiling since right now, we cannot
-- discriminant constraint on access type if it is constraining
-- the current record. Avoid creating the implicit subtype of the
-- record we are currently compiling since right now, we cannot
if Known_To_Have_Preelab_Init (Priv_T) then
-- Case where there is a pragma Preelaborable_Initialization. We
if Known_To_Have_Preelab_Init (Priv_T) then
-- Case where there is a pragma Preelaborable_Initialization. We
- -- always allow this in predefined units, which is a bit of a kludge,
+ -- always allow this in predefined units, which is cheating a bit,
-- but it means we don't have to struggle to meet the requirements in
-- the RM for having Preelaborable Initialization. Otherwise we
-- require that the type meets the RM rules. But we can't check that
-- but it means we don't have to struggle to meet the requirements in
-- the RM for having Preelaborable Initialization. Otherwise we
-- require that the type meets the RM rules. But we can't check that
--------------------------------
procedure Remove_Abstract_Operations (N : Node_Id) is
--------------------------------
procedure Remove_Abstract_Operations (N : Node_Id) is
- Abstract_Op : Entity_Id := Empty;
- Address_Kludge : Boolean := False;
- I : Interp_Index;
- It : Interp;
+ Abstract_Op : Entity_Id := Empty;
+ Address_Descendent : Boolean := False;
+ I : Interp_Index;
+ It : Interp;
-- AI-310: If overloaded, remove abstract non-dispatching operations. We
-- activate this if either extensions are enabled, or if the abstract
-- AI-310: If overloaded, remove abstract non-dispatching operations. We
-- activate this if either extensions are enabled, or if the abstract
end if;
if Is_Descendent_Of_Address (Etype (Formal)) then
end if;
if Is_Descendent_Of_Address (Etype (Formal)) then
- Address_Kludge := True;
+ Address_Descendent := True;
Remove_Interp (I);
end if;
Remove_Interp (I);
end if;
Abstract_Op := It.Nam;
if Is_Descendent_Of_Address (It.Typ) then
Abstract_Op := It.Nam;
if Is_Descendent_Of_Address (It.Typ) then
- Address_Kludge := True;
+ Address_Descendent := True;
-- predefined operators when addresses are involved since this
-- case is handled separately.
-- predefined operators when addresses are involved since this
-- case is handled separately.
- elsif Ada_Version >= Ada_2005
- and then not Address_Kludge
- then
+ elsif Ada_Version >= Ada_2005 and then not Address_Descendent then
while Present (It.Nam) loop
if Is_Numeric_Type (It.Typ)
and then Scope (It.Typ) = Standard_Standard
while Present (It.Nam) loop
if Is_Numeric_Type (It.Typ)
and then Scope (It.Typ) = Standard_Standard
procedure Analyze_Generic_Package_Renaming (N : Node_Id) is
begin
procedure Analyze_Generic_Package_Renaming (N : Node_Id) is
begin
- -- Apply the Text_IO Kludge here, since we may be renaming one of the
- -- subpackages of Text_IO, then join common routine.
+ -- Test for the Text_IO special unit case here, since we may be renaming
+ -- one of the subpackages of Text_IO, then join common routine.
Check_Text_IO_Special_Unit (Name (N));
Check_Text_IO_Special_Unit (Name (N));
- -- Apply Text_IO kludge here since we may be renaming a child of Text_IO
+ -- Check for Text_IO special unit (we may be renaming a Text_IO child)
Check_Text_IO_Special_Unit (Name (N));
Check_Text_IO_Special_Unit (Name (N));
-- Ada_83 because there is no requirement of full conformance between
-- renamed entity and new entity, even though the same circuit is used.
-- Ada_83 because there is no requirement of full conformance between
-- renamed entity and new entity, even though the same circuit is used.
- -- This is a bit of a kludge, which introduces a really irregular use of
- -- Ada_Version[_Explicit]. Would be nice to find cleaner way to do this
- -- ???
+ -- This is a bit of an odd case, which introduces a really irregular use
+ -- of Ada_Version[_Explicit]. Would be nice to find cleaner way to do
+ -- this. ???
Ada_Version := Ada_Version_Type'Max (Ada_Version, Ada_95);
Ada_Version_Pragma := Empty;
Ada_Version := Ada_Version_Type'Max (Ada_Version, Ada_95);
Ada_Version_Pragma := Empty;
-- Given an entity name, see if the name appears to have something to
-- do with I/O or network stuff, and if so, return True. Used to kill
-- some false positives on a heuristic basis that such functions will
-- Given an entity name, see if the name appears to have something to
-- do with I/O or network stuff, and if so, return True. Used to kill
-- some false positives on a heuristic basis that such functions will
- -- likely have some strange side effect dependencies. A rather funny
- -- kludge, but warning messages are in the heuristics business.
+ -- likely have some strange side effect dependencies. A rather strange
+ -- test, but warning messages are in the heuristics business.
function Test_Ref (N : Node_Id) return Traverse_Result;
-- Test for reference to variable in question. Returns Abandon if
function Test_Ref (N : Node_Id) return Traverse_Result;
-- Test for reference to variable in question. Returns Abandon if
-- --
-- B o d y --
-- --
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
-- --
-- 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- --
Visit_Descendent (Field22 (N));
Visit_Descendent (Field23 (N));
Visit_Descendent (Field22 (N));
Visit_Descendent (Field23 (N));
- -- Now an interesting kludge. Normally parents are always printed
- -- since we traverse the tree in a downwards direction. There is
- -- however an exception to this rule, which is the case where a
- -- parent is constructed by the compiler and is not referenced
- -- elsewhere in the tree. The following catches this case
+ -- Now an interesting special case. Normally parents are always
+ -- printed since we traverse the tree in a downwards direction.
+ -- However, there is an exception to this rule, which is the
+ -- case where a parent is constructed by the compiler and is not
+ -- referenced elsewhere in the tree. The following catches this case.
if not Comes_From_Source (N) then
Visit_Descendent (Union_Id (Parent (N)));
if not Comes_From_Source (N) then
Visit_Descendent (Union_Id (Parent (N)));