-- Reset when we find a unit that depends on the default and does
-- not have a local specification of the Optimize_Alignment setting.
- OA_Unit : Unit_Id;
+ OA_Unit : Unit_Id := No_Unit_Id;
-- Id of unit from which OA_Setting was set
C : Character;
null;
else
+ pragma Assert (Present (OA_Unit));
Error_Msg_Unit_1 := Units.Table (OA_Unit).Uname;
Error_Msg_Unit_2 := Units.Table (U).Uname;
-- becomes zero, then add to no-predecessor list.
S := UNR.Table (Chosen).Successors;
+ pragma Annotate (CodePeer, Modified, S);
+
while S /= No_Successor loop
U := Succ.Table (S).After;
UNR.Table (U).Num_Pred := UNR.Table (U).Num_Pred - 1;
begin
if ST.Reason in Elab_All .. Elab_All_Desirable then
L := ST.Elab_All_Link;
+ pragma Annotate (CodePeer, Modified, L);
+
while L /= No_Elab_All_Link loop
Nam := Elab_All_Entries.Table (L).Needed_By;
Error_Msg_Unit_1 := Nam;
(G => Lib_Graph,
Cycle => Cycle);
- Current_Edge : Library_Graph_Edge_Id;
+ Current_Edge : Library_Graph_Edge_Id := No_Library_Graph_Edge;
First_Edge : Library_Graph_Edge_Id;
Iter : Edges_Of_Cycle_Iterator;
Next_Edge : Library_Graph_Edge_Id;
else
declare
- Rtype : Entity_Id;
- pragma Warnings (Off, Rtype);
+ Rtype : Entity_Id := Empty;
New_Alts : List_Id;
New_Exp : Node_Id;
Expression => Expression (N),
Alternatives => New_Alts));
+ pragma Assert (Present (Rtype));
Reanalyze (Rtype, Suppress => True);
end;
end if;
-- specifically optimized for the target.
function Aggr_Assignment_OK_For_Backend (N : Node_Id) return Boolean is
- Csiz : Uint;
+ Csiz : Uint := No_Uint;
Ctyp : Entity_Id;
Expr : Node_Id;
High : Node_Id;
-- Scalar types are OK if their size is a multiple of Storage_Unit
elsif Is_Scalar_Type (Ctyp) then
+ pragma Assert (Csiz /= No_Uint);
+
if Csiz mod System_Storage_Unit /= 0 then
return False;
end if;
declare
Comp : Entity_Id;
First : Boolean;
- M_Id : Entity_Id;
+ M_Id : Entity_Id := Empty;
Typ : Entity_Id;
begin
-- Reuse the same master to service any additional types
else
+ pragma Assert (Present (M_Id));
Set_Master_Id (Typ, M_Id);
end if;
end if;
-- to just do a Copy_Node to get an appropriate copy. The extra zeroth
-- entry always is set to zero. The length is of type Artyp.
- Low_Bound : Node_Id;
+ Low_Bound : Node_Id := Empty;
-- A tree node representing the low bound of the result (of type Ityp).
-- This is either an integer literal node, or an identifier reference to
-- a constant entity initialized to the appropriate value.
High_Bound : Node_Id := Empty;
-- A tree node representing the high bound of the result (of type Ityp)
- Result : Node_Id;
+ Result : Node_Id := Empty;
-- Result of the concatenation (of type Ityp)
Actions : constant List_Id := New_List;
end;
end if;
+ pragma Assert (Present (Low_Bound));
+
-- Now we can safely compute the upper bound, normally
-- Low_Bound + Length - 1.
Result := New_Occurrence_Of (Ent, Loc);
<<Done>>
+ pragma Assert (Present (Result));
Rewrite (Cnode, Result);
Analyze_And_Resolve (Cnode, Atyp);
declare
Idx : Node_Id := First_Index (E);
Len : Node_Id;
- Res : Node_Id;
- pragma Warnings (Off, Res);
+ Res : Node_Id := Empty;
begin
for J in 1 .. Number_Dimensions (E) loop
Res := Len;
else
+ pragma Assert (Present (Res));
Res :=
Make_Op_Multiply (Loc,
Left_Opnd => Res,
elsif Is_Protected_Body then
declare
Spec : constant Node_Id := Parent (Corresponding_Spec (N));
- Conc_Typ : Entity_Id;
+ Conc_Typ : Entity_Id := Empty;
Param : Node_Id;
Param_Typ : Entity_Id;
end loop;
pragma Assert (Present (Param));
+ pragma Assert (Present (Conc_Typ));
-- Historical note: In earlier versions of GNAT, there was code
-- at this point to generate stuff to service entry queues. It is
Blk_Decl : Node_Id := Empty;
Blk_Decls : List_Id := No_List;
Blk_Ins : Node_Id;
- Blk_Stmts : List_Id;
- Loc : Source_Ptr;
+ Blk_Stmts : List_Id := No_List;
+ Loc : Source_Ptr := No_Location;
Obj_Decl : Node_Id;
-- Start of processing for Process_Transients_In_Scope
-- Construct all necessary circuitry to hook and finalize a
-- single transient object.
+ pragma Assert (Present (Blk_Stmts));
Process_Transient_In_Scope
(Obj_Decl => Obj_Decl,
Blk_Data => Blk_Data,
if Present (Blk_Decl) then
+ pragma Assert (Present (Blk_Stmts));
+ pragma Assert (Loc /= No_Location);
+
-- Note that this Abort_Undefer does not require a extra block or
-- an AT_END handler because each finalization exception is caught
-- in its own corresponding finalization block. As a result, the
Lo : Node_Id;
Hi : Node_Id;
Decls : List_Id := New_List;
- Ret : Node_Id;
+ Ret : Node_Id := Empty;
Spec : Node_Id;
Siz : Node_Id := Empty;
Make_Simple_Return_Statement (Loc,
Expression => Make_Integer_Literal (Loc, 1));
- elsif Nkind (Ret) = N_If_Statement then
+ else
+ pragma Assert (Present (Ret));
- -- Ranges are in increasing order, so last one doesn't need guard
+ if Nkind (Ret) = N_If_Statement then
- declare
- Nod : constant Node_Id := Last (Elsif_Parts (Ret));
- begin
- Remove (Nod);
- Set_Else_Statements (Ret, Then_Statements (Nod));
- end;
+ -- Ranges are in increasing order, so last one doesn't need
+ -- guard.
+
+ declare
+ Nod : constant Node_Id := Last (Elsif_Parts (Ret));
+ begin
+ Remove (Nod);
+ Set_Else_Statements (Ret, Then_Statements (Nod));
+ end;
+ end if;
end if;
end if;
declare
Elmt : Elmt_Id;
- Op : Entity_Id;
- pragma Warnings (Off, Op);
+ Op : Entity_Id := Empty;
begin
Elmt := First_Elmt (Primitive_Operations (Etype (Conc_Typ)));
Next_Elmt (Elmt);
end loop;
+ pragma Assert (Present (Op));
+
return
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Op, Loc),
Num_Alts : Nat;
Num_Accept : Nat := 0;
Proc : Node_Id;
- Time_Type : Entity_Id;
+ Time_Type : Entity_Id := Empty;
Select_Call : Node_Id;
Qnam : constant Entity_Id :=
Delay_Min :=
Make_Defining_Identifier (Loc, New_External_Name ('D', 3));
+ pragma Assert (Present (Time_Type));
+
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Delay_Val,
Sources.Last
loop
Current_Source := Sources.Table (Index);
+ pragma Annotate
+ (CodePeer, Modified, Current_Source);
if Opt.Verbose_Mode then
if Current_Source.Spec then
-- this soft link, or this will be overridden during the elaboration of
-- System.Tasking.Initialization
+ pragma Annotate (CodePeer, Modified, SSL.Timed_Delay);
+
if SSL.Timed_Delay = null then
SSL.Timed_Delay := Timed_Delay_NT'Access;
end if;
if End_T < Leap_Second_Times (1) then
Elapsed_Leaps := 0;
Next_Leap := Leap_Second_Times (1);
- return;
elsif Start_T > Leap_Second_Times (Leap_Seconds_Count) then
Elapsed_Leaps := 0;
Next_Leap := End_Of_Time;
- return;
- end if;
-
- -- Perform the calculations only if the start date is within the leap
- -- second occurrences table.
- if Start_T <= Leap_Second_Times (Leap_Seconds_Count) then
+ else
+ -- Perform the calculations only if the start date is within the leap
+ -- second occurrences table.
-- 1 2 N - 1 N
-- +----+----+-- . . . --+-------+---+
end if;
Elapsed_Leaps := End_Index - Start_Index;
-
- else
- Elapsed_Leaps := 0;
end if;
end Cumulative_Leap_Seconds;
(Secs_T'Unchecked_Access,
Flag'Unchecked_Access,
Offset'Unchecked_Access);
+ pragma Annotate (CodePeer, Modified, Offset);
return Long_Integer (Offset);
end UTC_Time_Offset;
-- return false, the test can only be written thus.
if not (abs (X) <= R'Last) then
+ pragma Annotate
+ (CodePeer, Intentional,
+ "test always false", "test for infinity");
+
X := Scale**2 * ((Left.Re / Scale) * (Right.Re / Scale) -
(Left.Im / Scale) * (Right.Im / Scale));
end if;
if not (abs (Y) <= R'Last) then
+ pragma Annotate
+ (CodePeer, Intentional,
+ "test always false", "test for infinity");
+
Y := Scale**2 * ((Left.Re / Scale) * (Right.Im / Scale)
+ (Left.Im / Scale) * (Right.Re / Scale));
end if;
exception
when Constraint_Error =>
+ pragma Assert (X.Re /= 0.0);
return R (Double (abs (X.Re))
* Sqrt (1.0 + (Double (X.Im) / Double (X.Re)) ** 2));
end;
exception
when Constraint_Error =>
+ pragma Assert (X.Im /= 0.0);
return R (Double (abs (X.Im))
* Sqrt (1.0 + (Double (X.Re) / Double (X.Im)) ** 2));
end;
Z := G * G;
P := G * ((P2 * Z + P1) * Z + P0);
Q := ((Q3 * Z + Q2) * Z + Q1) * Z + Q0;
+
+ pragma Assert (Q /= P);
R := 0.5 + P / (Q - P);
R := Float_Type'Base'Scaling (R, Integer (XN) + 1);
function Compute_Tan (P, H : Real) return Real is
(if Is_Tiny (P, Compared_To => H) then P / H
else Compute_Tan (Theta => H / (2.0 * P)));
+ pragma Annotate
+ (CodePeer, False_Positive, "divide by zero", "H, P /= 0");
function Sum_Strict_Upper (M : Square_Matrix) return Real;
-- Return the sum of all elements in the strict upper triangle of M
elsif From not in Source'Range
or else Through > Source'Last
then
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "test always false", "self fullfilling prophecy");
+
-- In most cases this raises an exception, but the case of deleting
-- a null string at the end of the current one is a special-case, and
-- reflects the equivalence with Replace_String (RM A.4.3 (86/3)).
begin
timeval_to_duration (T, sec'Access, usec'Access);
+ pragma Annotate (CodePeer, Modified, sec);
+ pragma Annotate (CodePeer, Modified, usec);
+
return Duration (sec) + Duration (usec) / Micro;
end To_Duration;
when End_Of_Source_Reached
| Wrong_Syntax
=>
+ Time :=
+ Time_Of (Year_Number'First, Month_Number'First, Day_Number'First);
Success := False;
end Parse_ISO_8861_UTC;
P : Switch_Parameter_Type;
begin
+ Param := Parameter_None;
Index_In_Switches := 0;
Switch_Length := 0;
begin
Valid := Is_Valid (Storage_Address);
+ Size_In_Storage_Elements := Storage_Count'First;
if Is_Valid (Storage_Address) then
declare
begin
K := K + 1;
+ pragma Annotate (CodePeer, Modified, P);
+
if P = '%' or else Path (K) = '{' then
-- Set terminator character
-- from 2NlogN to NlogN.
procedure Sort (N : Natural) is
+ pragma Annotate (CodePeer, Skip_Analysis);
+ -- CodePeer is sometimes getting confused on this procedure
Max : Natural := N;
-- Current Max index in tree being sifted
E := Get_Edges (J);
if Get_Graph (E.Y) = -1 then
+ pragma Assert (NK /= 0);
Set_Graph (E.Y, (E.Key - Get_Graph (X)) mod NK);
Assign (E.Y);
end if;
-- in the position selection.
for J in S'Range loop
+ pragma Annotate (CodePeer, Modified, S (J));
+
if S (J).First = S (J).Last then
F := S (J).First;
L := S (J).Last;
for P in 1 .. Last_Sel_Pos - 1 loop
if Max_Diff_Sel_Pos < Sel_Position (P) then
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "test always false", "false positive?");
+
Sel_Position (P + 1 .. Last_Sel_Pos) :=
Sel_Position (P .. Last_Sel_Pos - 1);
Sel_Position (P) := Max_Diff_Sel_Pos;
for J in 0 .. T1_Len - 1 loop
exit when Word (J + 1) = ASCII.NUL;
R := Get_Table (Table, J, Get_Used_Char (Word (J + 1)));
+ pragma Assert (NV /= 0);
S := (S + R) mod NV;
end loop;
for J in 0 .. T1_Len - 1 loop
exit when Word (J + 1) = ASCII.NUL;
R := Get_Table (Table, J, 0);
+ pragma Assert (NV /= 0);
S := (S + R * Character'Pos (Word (J + 1))) mod NV;
end loop;
end case;
-- the waiting task to resume its execution.
Res := Signalling_Fds.Create (Two_Fds'Access);
+ pragma Annotate (CodePeer, Modified, Two_Fds);
if Res = Failure then
Raise_Socket_Error (Socket_Errno);
((if Family = Family_Unspec then Default_Socket_Pair_Family
else Families (Family)),
Modes (Mode), Levels (Level), Pair'Access);
+ pragma Annotate (CodePeer, Modified, Pair);
if Res = Failure then
Raise_Socket_Error (Socket_Errno);
if Item.Last /= No_Socket then
Get_Socket_From_Set
(Item.Set'Access, Last => L'Access, Socket => S'Access);
+ pragma Annotate (CodePeer, Modified, L);
+ pragma Annotate (CodePeer, Modified, S);
+
Item.Last := Socket_Type (L);
Socket := Socket_Type (S);
+
else
Socket := No_Socket;
end if;
-- To_Int --
------------
- function To_Int (F : Request_Flag_Type) return C.int
- is
+ function To_Int (F : Request_Flag_Type) return C.int is
Current : Request_Flag_Type := F;
Result : C.int := 0;
if Current mod 2 /= 0 then
if Flags (J) = -1 then
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "test always false", "self fulfilling prophecy");
+
Raise_Socket_Error (SOSC.EOPNOTSUPP);
end if;
(COBOL_Character'Pos (K) -
COBOL_Character'Pos (COBOL_Digits'First));
- elsif K in COBOL_Plus_Digits then
- Result := Result * 10 +
- (COBOL_Character'Pos (K) -
- COBOL_Character'Pos (COBOL_Plus_Digits'First));
-
elsif K in COBOL_Minus_Digits then
Result := Result * 10 +
(COBOL_Character'Pos (K) -
or else Info_Sec = Null_Section
or else Aranges_Sec = Null_Section
then
+ pragma Annotate
+ (CodePeer, False_Positive,
+ "test always true", "codepeer got confused");
+
C.Has_Debug := False;
return;
end if;
Success : out Boolean)
is
begin
+ Info_Offset := 0;
Seek (C.Aranges, 0);
while Tell (C.Aranges) < Length (C.Aranges) loop
end;
end loop;
end loop;
+
Success := False;
end Aranges_Lookup;
Has_Child : uint8;
pragma Unreferenced (Has_Child);
begin
+ Line_Offset := 0;
Success := False;
Seek (C.Info, Info_Offset);
Version : uint16;
Sz : uint8;
begin
- Success := False;
+ Success := False;
+ Info_Offset := 0;
Read_Initial_Length (C.Aranges, Unit_Length, Is64);
Success : Boolean;
Done : Boolean;
S : Object_Symbol;
+
begin
-- Initialize result
Dir_Name := null;
begin
First := C.Cache'First;
Last := C.Cache'Last;
+ Mid := First;
+
while First <= Last loop
Mid := First + (Last - First) / 2;
if Addr_Off < C.Cache (Mid).First then
exit;
end if;
end loop;
+
if Addr_Off >= C.Cache (Mid).First
and then Addr_Off < C.Cache (Mid).First + C.Cache (Mid).Size
then
C.Next_Prologue := 0;
Initialize_State_Machine (C);
Parse_Prologue (C);
+ Previous_Row.Line := 0;
-- Advance to the first entry
(Cin : Dwarf_Context;
Traceback : AET.Tracebacks_Array;
Suppress_Hex : Boolean;
- Symbol_Found : in out Boolean;
+ Symbol_Found : out Boolean;
Res : in out System.Bounded_Strings.Bounded_String)
is
use Ada.Characters.Handling;
(Cin : Dwarf_Context;
Traceback : AET.Tracebacks_Array;
Suppress_Hex : Boolean;
- Symbol_Found : in out Boolean;
+ Symbol_Found : out Boolean;
Res : in out System.Bounded_Strings.Bounded_String);
-- Generate a string for a traceback suitable for displaying to the user.
-- If one or more symbols are found, Symbol_Found is set to True. This
Ax := Ax * R_Power (Expbits'Last);
Ex := Ex - Log_Power (Expbits'Last);
end loop;
+ pragma Annotate
+ (CodePeer, Intentional,
+ "test always false",
+ "expected for some instantiations");
-- Rad ** -64 <= Ax < 1
for J in N'Range (2) loop
N (Row - M'First (1) + N'First (1), J) :=
N (Row - M'First (1) + N'First (1), J) / Scale;
+ pragma Annotate
+ (CodePeer, False_Positive, "divide by zero", "Scale /= 0");
end loop;
end Divide_Row;
end if;
elsif X > Real'Base'Last then
+ pragma Annotate
+ (CodePeer, Intentional,
+ "test always false", "test for infinity");
-- X is infinity, which is its own square root
-- of precision.
for J in 1 .. 8 loop
+ pragma Assert (Root /= 0.0);
+
Next := (Root + X / Root) / 2.0;
exit when Root = Next;
Root := Next;
ND := 0;
for J in 1 .. X.Len loop
ND := Base * ND + DD (X.D (J));
+ pragma Assert (Div /= 0);
Result (J) := SD (ND / Div);
ND := ND rem Div;
end loop;
-- What we are looking for is a power of ten to divide X by
-- so that the result lies within the required range.
+ pragma Assert (Powten (Maxpow) /= 0.0);
+
loop
XP := X / Powten (Maxpow);
exit when XP < Powten (S) or else Scale > Maxscaling;
-- an infinite value, so we print Inf.
if V > Long_Long_Float'Last then
+ pragma Annotate
+ (CodePeer, Intentional, "test always true", "test for infinity");
+
Set ('+');
Set ('I');
Set ('n');
-- touch destination file at all.
From := Open_Read (Name, Binary);
- if From /= Invalid_FD then
+
+ if From = Invalid_FD then
+ Success := False;
+ else
To := Open_Read_Write (Pathname, Binary);
+ Lseek (To, 0, Seek_End);
+ Copy (From, To);
end if;
- Lseek (To, 0, Seek_End);
-
- Copy (From, To);
-
-- Appending to directory, not allowed
elsif Is_Directory (Pathname) then
-- If the string ends with \, double it
+ pragma Annotate (CodePeer, Modified, Res (J - 1));
+
if Res (J - 1) = '\' then
Res (J) := '\';
J := J + 1;
K : Bit_Count; -- Next decrement to exponent
begin
+ K := 0;
Mantissa := Random (Gen) / 2**Extra_Bits;
R := Unsigned_32 (Mantissa mod 2**Extra_Bits);
R_Bits := Extra_Bits;
and then Expression (Parse_Pos + 1) /= ']'
then
Parse_Pos := Parse_Pos + 1;
-
- -- Do we have a range like '\d-a' and '[:space:]-a'
- -- which is not a real range
-
- if Named_Class /= ANYOF_NONE then
- Set_In_Class (Bitmap, '-');
- else
- In_Range := True;
- end if;
-
+ In_Range := True;
else
Set_In_Class (Bitmap, Value);
-
end if;
-- Else in a character range
(IP : Pointer;
Max : Natural := Natural'Last) return Natural
is
- Scan : Natural := Input_Pos;
- Last : Natural;
- Op : constant Opcode := Opcode'Val (Character'Pos (Program (IP)));
- Count : Natural;
- C : Character;
- Is_First : Boolean := True;
- Bitmap : Character_Class;
+ Scan : Natural := Input_Pos;
+ Last : Natural;
+ Op : constant Opcode :=
+ Opcode'Val (Character'Pos (Program (IP)));
+ Count : Natural;
+ C : Character;
+ Bitmap : Character_Class;
begin
if Max = Natural'Last or else Scan + Max - 1 > Last_In_Data then
end loop;
when ANYOF =>
- if Is_First then
- Bitmap_Operand (Program, IP, Bitmap);
- Is_First := False;
- end if;
+ Bitmap_Operand (Program, IP, Bitmap);
while Scan <= Last
and then Get_From_Class (Bitmap, Data (Scan))
Suppress_Hex : Boolean;
Res : in out Bounded_String)
is
- Success : Boolean := False;
+ Success : Boolean;
begin
if Symbolic.Module_Name.Is_Supported then
Append (Res, '[');
-- As_Digit --
--------------
- function As_Digit (C : Character) return Char_As_Digit
- is
+ function As_Digit (C : Character) return Char_As_Digit is
begin
case C is
when '0' .. '9' =>
Trailing_Zeros : Natural := 0;
-- Number of trailing zeros at a given point.
+
begin
+ pragma Assert (Base in 2 .. 16);
-- If initial Scale is not 0 then it means that Precision_Limit was
-- reached during integral part scanning.
end if;
end if;
end loop;
-
end Scan_Decimal_Digits;
--------------------------
-- Precision limit has been reached so just update the exponent
Scale := Scale + 1;
else
+ pragma Assert (Base /= 0);
+
if Value > (Precision_Limit - Digit) / Base then
-- Updating Value will overflow so ignore this digit and any
-- following ones. Only update the scale
-- First character can be either a decimal digit or a dot.
if Str (Index) in '0' .. '9' then
+ pragma Annotate
+ (CodePeer, Intentional,
+ "test always true", "defensive code below");
+
-- If this is a digit it can indicates either the float decimal
-- part or the base to use
Scan_Integral_Digits
Choice : Node_Id;
Choice_Hi : Uint;
Choice_Lo : Uint;
- Prev_Choice : Node_Id;
- pragma Warnings (Off, Prev_Choice);
+ Prev_Choice : Node_Id := Empty;
Prev_Hi : Uint;
begin
end if;
end loop;
+ pragma Assert (Present (Prev_Choice));
+
if Sloc (Prev_Choice) <= Sloc (Choice) then
Error_Msg_Sloc := Sloc (Prev_Choice);
Dup_Choice (Choice_Lo, UI_Min (Choice_Hi, Prev_Hi), Choice);
-- Local variables
Aspect : Node_Id;
- Aitem : Node_Id;
+ Aitem : Node_Id := Empty;
Ent : Node_Id;
L : constant List_Id := Aspect_Specifications (N);
Rectype : Entity_Id;
Fent : Entity_Id;
CC : Node_Id;
- Fbit : Uint;
- Lbit : Uint;
+ Fbit : Uint := No_Uint;
+ Lbit : Uint := No_Uint;
Hbit : Uint := Uint_0;
Comp : Entity_Id;
Pcomp : Entity_Id;
Nbit := Sbit;
for J in 1 .. Ncomps loop
CEnt := Comps (J);
+ pragma Annotate (CodePeer, Modified, CEnt);
declare
CBO : constant Uint := Component_Bit_Offset (CEnt);
Save_Unblocked_Exit_Count : constant Nat := Unblocked_Exit_Count;
-- Recursively save value of this global, will be restored on exit
- Save_In_Deleted_Code : Boolean;
+ Save_In_Deleted_Code : Boolean := In_Deleted_Code;
Del : Boolean := False;
-- This flag gets set True if a True condition has been found, which
-- explicit contract.
Prags : constant Node_Id := Contract (Parent_Subp);
- In_Spec_Expr : Boolean;
+ In_Spec_Expr : Boolean := In_Spec_Expression;
Installed : Boolean;
Prag : Node_Id;
New_Prag : Node_Id;
declare
Count_Components : Uint := Uint_0;
Num_Components : Uint;
- Others_Assoc : Node_Id;
+ Others_Assoc : Node_Id := Empty;
Others_Choice : Node_Id := Empty;
Others_Box_Present : Boolean := False;
-- minimum decoration required to collect the
-- identifiers.
+ pragma Assert (Present (Others_Assoc));
+
if not Expander_Active then
Comp_Expr := Expression (Others_Assoc);
else
procedure Insert_Explicit_Dereference (N : Node_Id) is
New_Prefix : constant Node_Id := Relocate_Node (N);
Ent : Entity_Id := Empty;
- Pref : Node_Id;
+ Pref : Node_Id := Empty;
I : Interp_Index;
It : Interp;
T : Entity_Id;
Discard_Int : Int;
pragma Warnings (Off, Discard_Int);
begin
+ pragma Assert (D /= Int'(0));
UI_Div_Vector
(Dividend (Dividend'Last - R_Length + 1 .. Dividend'Last),
D,
Num : Uint;
begin
+ pragma Annotate (CodePeer, Modified, Lval);
+ pragma Annotate (CodePeer, Modified, Rval);
+
-- Note, in the temporary Ureal_Entry values used in this procedure,
-- we store the sign as the sign of the numerator (i.e. xxx.Num may
-- be negative, even though in stored entries this can never be so)
Rneg : constant Boolean := Rval.Negative xor Lval.Negative;
begin
+ pragma Annotate (CodePeer, Modified, Lval);
+ pragma Annotate (CodePeer, Modified, Rval);
pragma Assert (Rval.Num /= Uint_0);
if Lval.Rbase = 0 then
Value1 := Get_Value (Slice (Sline, 2));
Value2 := Get_Value (Slice (Sline, 4));
+ pragma Annotate (CodePeer, Modified, Value1);
+ pragma Annotate (CodePeer, Modified, Value2);
+
if Slice (Sline, 3) = ">" then
Res := Cond and (Value1 > Value2);
Current_Line : Integer;
Current_Info : Integer;
In_Comment : Boolean;
- In_Template : Boolean;
+ In_Template : Boolean := False;
-- Start of processing for XOSCons
Decl : Declaration_Reference := Entities_HTable.Get_First;
Arr : Reference_Array_Access;
Index : Natural;
- End_Index : Natural;
+ End_Index : Natural := 0;
Current_File : File_Reference;
Current_Line : Cst_String_Access;
Buffer : GNAT.OS_Lib.String_Access;
Ref : Reference;
- Line : Natural;
+ Line : Natural := Natural'Last;
begin
-- Create a temporary array, where all references will be
-- --
------------------------------------------------------------------------------
+pragma Ada_2012;
+
with Osint;
with Output; use Output;
with Types; use Types;
E_Line : Natural; -- Line number of current entity
E_Col : Natural; -- Column number of current entity
- E_Type : Character; -- Type of current entity
E_Name : Positive; -- Pointer to begin of entity name
E_Global : Boolean; -- True iff entity is global
+ E_Type : Character; -- Type of current entity
R_Line : Natural; -- Line number of current reference
R_Col : Natural; -- Column number of current reference
- R_Type : Character; -- Type of current reference
+
+ R_Type : Character := ASCII.NUL; -- Type of current reference
Decl_Ref : Declaration_Reference;
File_Ref : File_Reference := Current_Xref_File (File);
if Ali (Ptr) > ' ' then
E_Type := Ali (Ptr);
Ptr := Ptr + 1;
- end if;
- -- Ignore some of the entities (labels,...)
+ -- Ignore some of the entities (labels,...)
- case E_Type is
- when 'l' | 'L' | 'q' =>
+ if E_Type in 'l' | 'L' | 'q' then
Parse_EOL (Ali, Ptr, Skip_Continuation_Line => True);
return;
+ end if;
+ else
+ -- Unexpected contents, skip line and return
- when others =>
- null;
- end case;
+ Parse_EOL (Ali, Ptr, Skip_Continuation_Line => True);
+ return;
+ end if;
Parse_Number (Ali, Ptr, E_Col);
Parse_Derived_Info : declare
P_Line : Natural; -- parent entity line
P_Column : Natural; -- parent entity column
- P_Eun : Positive; -- parent entity file number
+ P_Eun : Natural := 0; -- parent entity file number
begin
Parse_Number (Ali, Ptr, P_Line);
-- on or if we want to output the type hierarchy
if Der_Info or else Type_Tree then
+ pragma Assert (P_Eun /= 0);
+
declare
Symbol : constant String :=
Get_Symbol_Name (P_Eun, P_Line, P_Column);
-- 5U14*Foo2 5>20 6b<c,myfoo2>22 # Imported entity
-- 5U14*Foo2 5>20 6i<c,myfoo2>22 # Exported entity
- if (R_Type = 'b' or else R_Type = 'i')
- and then Ali (Ptr) = '<'
+ if Ali (Ptr) = '<'
+ and then (R_Type = 'b' or else R_Type = 'i')
then
while Ptr <= Ali'Last
and then Ali (Ptr) /= '>'
Parse_Number (Ali, Ptr, R_Col);
+ pragma Assert (R_Type /= ASCII.NUL);
+
-- Insert the reference or body in the table
Add_Reference