Commit aa3efecd by Arnaud Charlet

[multiple changes]

2014-07-31  Robert Dewar  <dewar@adacore.com>

	* par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
	* par-ch2.adb (P_Pragma): Set Inside_Depends.
	* par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
	Check_Unary_Plus_Or_Minus.
	* scans.ads (Inside_Depends): New flag.
	* scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
	* style.ads: Add Inside_Depends parameter to Check_Arrow Add
	Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
	* styleg.adb (Check_Arrow): Handle Inside_Depends case.
	(Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
	* styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
	Inside_Depends parameter to Check_Unary_Plus_Or_Minus.

2014-07-31  Javier Miranda  <miranda@adacore.com>

	* s-vaflop.adb Move the body of function T_To_G before
	T_To_D. Required for frontend inlining.
	* inline.adb (Has_Excluded_Contract): New subprogram used to
	check if a subprogram inlined by the frontend has contracts
	which cannot be inlined.

2014-07-31  Bob Duff  <duff@adacore.com>

	* s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
	(Call_Chain): Add 1 to number of frames to skip, to account for
	the fact that there's one more frame on the stack.

From-SVN: r213336
parent b7c874a7
2014-07-31 Robert Dewar <dewar@adacore.com> 2014-07-31 Robert Dewar <dewar@adacore.com>
* par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
* par-ch2.adb (P_Pragma): Set Inside_Depends.
* par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
Check_Unary_Plus_Or_Minus.
* scans.ads (Inside_Depends): New flag.
* scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
* style.ads: Add Inside_Depends parameter to Check_Arrow Add
Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
* styleg.adb (Check_Arrow): Handle Inside_Depends case.
(Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
* styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2014-07-31 Javier Miranda <miranda@adacore.com>
* s-vaflop.adb Move the body of function T_To_G before
T_To_D. Required for frontend inlining.
* inline.adb (Has_Excluded_Contract): New subprogram used to
check if a subprogram inlined by the frontend has contracts
which cannot be inlined.
2014-07-31 Bob Duff <duff@adacore.com>
* s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
(Call_Chain): Add 1 to number of frames to skip, to account for
the fact that there's one more frame on the stack.
2014-07-31 Robert Dewar <dewar@adacore.com>
* checks.adb (Enable_Overflow_Check): More precise setting of * checks.adb (Enable_Overflow_Check): More precise setting of
Do_Overflow_Check flag for division. Do_Overflow_Check flag for division.
......
...@@ -1828,6 +1828,10 @@ package body Inline is ...@@ -1828,6 +1828,10 @@ package body Inline is
-- - functions that have exception handlers -- - functions that have exception handlers
-- - functions that have some enclosing body containing instantiations -- - functions that have some enclosing body containing instantiations
-- that appear before the corresponding generic body. -- that appear before the corresponding generic body.
-- - functions that have some of the following contracts (and the
-- sources are compiled with assertions enabled):
-- - Pre/post condition
-- - Contract cases
procedure Generate_Body_To_Inline procedure Generate_Body_To_Inline
(N : Node_Id; (N : Node_Id;
...@@ -1926,6 +1930,9 @@ package body Inline is ...@@ -1926,6 +1930,9 @@ package body Inline is
Max_Size : constant := 10; Max_Size : constant := 10;
Stat_Count : Integer := 0; Stat_Count : Integer := 0;
function Has_Excluded_Contract return Boolean;
-- Check for contracts that cannot be inlined
function Has_Excluded_Declaration (Decls : List_Id) return Boolean; function Has_Excluded_Declaration (Decls : List_Id) return Boolean;
-- Check for declarations that make inlining not worthwhile -- Check for declarations that make inlining not worthwhile
...@@ -1956,6 +1963,70 @@ package body Inline is ...@@ -1956,6 +1963,70 @@ package body Inline is
-- unconstrained type, the secondary stack is involved, and it -- unconstrained type, the secondary stack is involved, and it
-- is not worth inlining. -- is not worth inlining.
---------------------------
-- Has_Excluded_Contract --
---------------------------
function Has_Excluded_Contract return Boolean is
function Check_Excluded_Contracts (E : Entity_Id) return Boolean;
-- Return True if the subprogram E has unsupported contracts
function Check_Excluded_Contracts (E : Entity_Id) return Boolean is
Items : constant Node_Id := Contract (E);
begin
if Present (Items) then
if Present (Pre_Post_Conditions (Items))
or else Present (Contract_Test_Cases (Items))
then
Cannot_Inline
("cannot inline & (non-allowed contract)?",
N, Subp);
return True;
end if;
end if;
return False;
end Check_Excluded_Contracts;
Decl : Node_Id;
P_Id : Pragma_Id;
begin
if Check_Excluded_Contracts (Spec_Id)
or else Check_Excluded_Contracts (Body_Id)
then
return True;
end if;
-- Check pragmas located in the body which may generate contracts
if Present (Declarations (N)) then
Decl := First (Declarations (N));
while Present (Decl) loop
if Nkind (Decl) = N_Pragma then
P_Id := Get_Pragma_Id (Pragma_Name (Decl));
if P_Id = Pragma_Contract_Cases or else
P_Id = Pragma_Pre or else
P_Id = Pragma_Precondition or else
P_Id = Pragma_Post or else
P_Id = Pragma_Postcondition
then
Cannot_Inline
("cannot inline & (non-allowed contract)?",
N, Subp);
return True;
end if;
end if;
Next (Decl);
end loop;
end if;
return False;
end Has_Excluded_Contract;
------------------------------ ------------------------------
-- Has_Excluded_Declaration -- -- Has_Excluded_Declaration --
------------------------------ ------------------------------
...@@ -2443,6 +2514,16 @@ package body Inline is ...@@ -2443,6 +2514,16 @@ package body Inline is
elsif Present (Body_To_Inline (Decl)) then elsif Present (Body_To_Inline (Decl)) then
return False; return False;
-- Cannot build the body to inline if the subprogram has unsupported
-- contracts that will be expanded into code (if assertions are not
-- enabled these pragmas will be removed by Generate_Body_To_Inline
-- to avoid reporting spurious errors).
elsif Assertions_Enabled
and then Has_Excluded_Contract
then
return False;
-- Subprograms that have return statements in the middle of the -- Subprograms that have return statements in the middle of the
-- body are inlined with gotos. GNATprove does not currently -- body are inlined with gotos. GNATprove does not currently
-- support gotos, so we prevent such inlining. -- support gotos, so we prevent such inlining.
...@@ -2660,7 +2741,10 @@ package body Inline is ...@@ -2660,7 +2741,10 @@ package body Inline is
Nxt := Next (Decl); Nxt := Next (Decl);
if Nkind (Decl) = N_Pragma if Nkind (Decl) = N_Pragma
and then Nam_In (Pragma_Name (Decl), Name_Unreferenced, and then Nam_In (Pragma_Name (Decl), Name_Contract_Cases,
Name_Precondition,
Name_Postcondition,
Name_Unreferenced,
Name_Unmodified) Name_Unmodified)
then then
Remove (Decl); Remove (Decl);
......
...@@ -170,6 +170,8 @@ package body Ch13 is ...@@ -170,6 +170,8 @@ package body Ch13 is
Scan; -- past WITH Scan; -- past WITH
Aspects := Empty_List; Aspects := Empty_List;
-- Loop to scan aspects
loop loop
OK := True; OK := True;
...@@ -445,6 +447,12 @@ package body Ch13 is ...@@ -445,6 +447,12 @@ package body Ch13 is
end if; end if;
end if; end if;
-- Note if inside Depends aspect
if A_Id = Aspect_Depends then
Inside_Depends := True;
end if;
-- Parse the aspect definition depening on the expected -- Parse the aspect definition depening on the expected
-- argument kind. -- argument kind.
...@@ -460,6 +468,10 @@ package body Ch13 is ...@@ -460,6 +468,10 @@ package body Ch13 is
Aspect_Argument (A_Id) = Optional_Expression); Aspect_Argument (A_Id) = Optional_Expression);
Set_Expression (Aspect, P_Expression); Set_Expression (Aspect, P_Expression);
end if; end if;
-- Unconditionally reset flag for Inside_Depends
Inside_Depends := False;
end if; end if;
-- Add the aspect to the resulting list only when it was properly -- Add the aspect to the resulting list only when it was properly
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -298,13 +298,19 @@ package body Ch2 is ...@@ -298,13 +298,19 @@ package body Ch2 is
Import_Check_Required := False; Import_Check_Required := False;
end if; end if;
-- Set global to indicate if we are within a Depends pragma
if Chars (Ident_Node) = Name_Depends then
Inside_Depends := True;
end if;
-- Scan arguments. We assume that arguments are present if there is -- Scan arguments. We assume that arguments are present if there is
-- a left paren, or if a semicolon is missing and there is another -- a left paren, or if a semicolon is missing and there is another
-- token on the same line as the pragma name. -- token on the same line as the pragma name.
if Token = Tok_Left_Paren if Token = Tok_Left_Paren
or else (Token /= Tok_Semicolon or else (Token /= Tok_Semicolon
and then not Token_Is_At_Start_Of_Line) and then not Token_Is_At_Start_Of_Line)
then then
Set_Pragma_Argument_Associations (Prag_Node, New_List); Set_Pragma_Argument_Associations (Prag_Node, New_List);
T_Left_Paren; T_Left_Paren;
...@@ -349,6 +355,11 @@ package body Ch2 is ...@@ -349,6 +355,11 @@ package body Ch2 is
Semicolon_Loc := Token_Ptr; Semicolon_Loc := Token_Ptr;
-- Cancel indication of being within Depends pragm. Can be done
-- unconditionally, since quicker than doing a test.
Inside_Depends := False;
-- Now we have two tasks left, we need to scan out the semicolon -- Now we have two tasks left, we need to scan out the semicolon
-- following the pragma, and we have to call Par.Prag to process -- following the pragma, and we have to call Par.Prag to process
-- the pragma. Normally we do them in this order, however, there -- the pragma. Normally we do them in this order, however, there
......
...@@ -2106,7 +2106,7 @@ package body Ch4 is ...@@ -2106,7 +2106,7 @@ package body Ch4 is
Node1 := New_Op_Node (P_Unary_Adding_Operator, Tokptr); Node1 := New_Op_Node (P_Unary_Adding_Operator, Tokptr);
if Style_Check then if Style_Check then
Style.Check_Unary_Plus_Or_Minus; Style.Check_Unary_Plus_Or_Minus (Inside_Depends);
end if; end if;
Scan; -- past operator Scan; -- past operator
......
...@@ -262,14 +262,15 @@ package body System.Traceback is ...@@ -262,14 +262,15 @@ package body System.Traceback is
-- but it is not usable when frames with dynamically allocated space are -- but it is not usable when frames with dynamically allocated space are
-- on the way. -- on the way.
procedure Call_Chain -- procedure Call_Chain
(Traceback : System.Address; -- (Traceback : System.Address;
Max_Len : Natural; -- Max_Len : Natural;
Len : out Natural; -- Len : out Natural;
Exclude_Min : System.Address := System.Null_Address; -- Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address; -- Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1); -- Skip_Frames : Natural := 1);
-- Same as the exported version, but takes Traceback as an Address -- -- Same as the exported version, but takes Traceback as an Address
-- ???See declaration in the spec for why this is temporarily commented out.
------------------ ------------------
-- C_Call_Chain -- -- C_Call_Chain --
...@@ -280,7 +281,6 @@ package body System.Traceback is ...@@ -280,7 +281,6 @@ package body System.Traceback is
Max_Len : Natural) return Natural Max_Len : Natural) return Natural
is is
Val : Natural; Val : Natural;
begin begin
Call_Chain (Traceback, Max_Len, Val); Call_Chain (Traceback, Max_Len, Val);
return Val; return Val;
...@@ -618,7 +618,8 @@ package body System.Traceback is ...@@ -618,7 +618,8 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames); Exclude_Min, Exclude_Max, Skip_Frames + 1);
-- Skip one extra frame so we skip the other Call_Chain as well
end Call_Chain; end Call_Chain;
end System.Traceback; end System.Traceback;
...@@ -37,14 +37,15 @@ package body System.Traceback is ...@@ -37,14 +37,15 @@ package body System.Traceback is
use System.Machine_State_Operations; use System.Machine_State_Operations;
procedure Call_Chain -- procedure Call_Chain
(Traceback : System.Address; -- (Traceback : System.Address;
Max_Len : Natural; -- Max_Len : Natural;
Len : out Natural; -- Len : out Natural;
Exclude_Min : System.Address := System.Null_Address; -- Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address; -- Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1); -- Skip_Frames : Natural := 1);
-- Same as the exported version, but takes Traceback as an Address -- -- Same as the exported version, but takes Traceback as an Address
-- ???See declaration in the spec for why this is temporarily commented out.
---------------- ----------------
-- Call_Chain -- -- Call_Chain --
...@@ -113,7 +114,8 @@ package body System.Traceback is ...@@ -113,7 +114,8 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames); Exclude_Min, Exclude_Max, Skip_Frames + 1);
-- Skip one extra frame so we skip the other Call_Chain as well
end Call_Chain; end Call_Chain;
------------------ ------------------
......
...@@ -38,14 +38,15 @@ pragma Compiler_Unit_Warning; ...@@ -38,14 +38,15 @@ pragma Compiler_Unit_Warning;
package body System.Traceback is package body System.Traceback is
procedure Call_Chain -- procedure Call_Chain
(Traceback : System.Address; -- (Traceback : System.Address;
Max_Len : Natural; -- Max_Len : Natural;
Len : out Natural; -- Len : out Natural;
Exclude_Min : System.Address := System.Null_Address; -- Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address; -- Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1); -- Skip_Frames : Natural := 1);
-- Same as the exported version, but takes Traceback as an Address -- -- Same as the exported version, but takes Traceback as an Address
-- ???See declaration in the spec for why this is temporarily commented out.
------------------ ------------------
-- C_Call_Chain -- -- C_Call_Chain --
...@@ -53,11 +54,9 @@ package body System.Traceback is ...@@ -53,11 +54,9 @@ package body System.Traceback is
function C_Call_Chain function C_Call_Chain
(Traceback : System.Address; (Traceback : System.Address;
Max_Len : Natural) Max_Len : Natural) return Natural
return Natural
is is
Val : Natural; Val : Natural;
begin begin
Call_Chain (Traceback, Max_Len, Val); Call_Chain (Traceback, Max_Len, Val);
return Val; return Val;
...@@ -110,7 +109,8 @@ package body System.Traceback is ...@@ -110,7 +109,8 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames); Exclude_Min, Exclude_Max, Skip_Frames + 1);
-- Skip one extra frame so we skip the other Call_Chain as well
end Call_Chain; end Call_Chain;
end System.Traceback; end System.Traceback;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1997-2012, Free Software Foundation, Inc. -- -- Copyright (C) 1997-2014, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -444,22 +444,24 @@ package body System.Vax_Float_Operations is ...@@ -444,22 +444,24 @@ package body System.Vax_Float_Operations is
end Sub_G; end Sub_G;
------------ ------------
-- T_To_D -- -- T_To_G --
------------ ------------
function T_To_D (X : T) return D is -- This function must be located before T_To_D for frontend inlining
function T_To_G (X : T) return G is
begin begin
return G_To_D (T_To_G (X)); return G (X);
end T_To_D; end T_To_G;
------------ ------------
-- T_To_G -- -- T_To_D --
------------ ------------
function T_To_G (X : T) return G is function T_To_D (X : T) return D is
begin begin
return G (X); return G_To_D (T_To_G (X));
end T_To_G; end T_To_D;
------------- -------------
-- Valid_D -- -- Valid_D --
......
...@@ -472,6 +472,10 @@ package Scans is ...@@ -472,6 +472,10 @@ package Scans is
-- Is it really right for this to be a Name rather than a String, what -- Is it really right for this to be a Name rather than a String, what
-- about the case of Wide_Wide_Characters??? -- about the case of Wide_Wide_Characters???
Inside_Depends : Boolean := False;
-- Flag set True for parsing the argument of a Depends pragma or aspect
-- (used to allow/require non-standard style rules for =>+ with -gnatyt).
Inside_If_Expression : Nat := 0; Inside_If_Expression : Nat := 0;
-- This is a counter that is set non-zero while scanning out an if -- This is a counter that is set non-zero while scanning out an if
-- expression (incremented on entry, decremented on exit). It is used to -- expression (incremented on entry, decremented on exit). It is used to
......
...@@ -1571,7 +1571,7 @@ package body Scng is ...@@ -1571,7 +1571,7 @@ package body Scng is
Token := Tok_Arrow; Token := Tok_Arrow;
if Style_Check then if Style_Check then
Style.Check_Arrow; Style.Check_Arrow (Inside_Depends);
end if; end if;
return; return;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2012, 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -79,7 +79,7 @@ package Style is ...@@ -79,7 +79,7 @@ package Style is
renames Style_Inst.Check_Apostrophe; renames Style_Inst.Check_Apostrophe;
-- Called after scanning an apostrophe to check spacing -- Called after scanning an apostrophe to check spacing
procedure Check_Arrow procedure Check_Arrow (Inside_Depends : Boolean := False)
renames Style_Inst.Check_Arrow; renames Style_Inst.Check_Arrow;
-- Called after scanning out an arrow to check spacing -- Called after scanning out an arrow to check spacing
...@@ -180,7 +180,7 @@ package Style is ...@@ -180,7 +180,7 @@ package Style is
-- procedure is called only if THEN appears at the start of a line with -- procedure is called only if THEN appears at the start of a line with
-- Token_Ptr pointing to the THEN keyword. -- Token_Ptr pointing to the THEN keyword.
procedure Check_Unary_Plus_Or_Minus procedure Check_Unary_Plus_Or_Minus (Inside_Depends : Boolean := False)
renames Style_Inst.Check_Unary_Plus_Or_Minus; renames Style_Inst.Check_Unary_Plus_Or_Minus;
-- Called after scanning a unary plus or minus to check spacing -- Called after scanning a unary plus or minus to check spacing
......
...@@ -126,13 +126,32 @@ package body Styleg is ...@@ -126,13 +126,32 @@ package body Styleg is
-- Check_Arrow -- -- Check_Arrow --
----------------- -----------------
-- In check tokens mode (-gnatys), arrow must be surrounded by spaces -- In check tokens mode (-gnatys), arrow must be surrounded by spaces,
-- except that within the argument of a Depends macro the required format
-- is =>+ rather than => +).
procedure Check_Arrow is procedure Check_Arrow (Inside_Depends : Boolean := False) is
begin begin
if Style_Check_Tokens then if Style_Check_Tokens then
Require_Preceding_Space; Require_Preceding_Space;
Require_Following_Space;
if not Inside_Depends then
Require_Following_Space;
-- Special handling for Inside_Depends
else
if Source (Scan_Ptr) = ' '
and then Source (Scan_Ptr + 1) = '+'
then
Error_Space_Not_Allowed (Scan_Ptr);
elsif Source (Scan_Ptr) /= ' '
and then Source (Scan_Ptr) /= '+'
then
Require_Following_Space;
end if;
end if;
end if; end if;
end Check_Arrow; end Check_Arrow;
...@@ -1032,10 +1051,17 @@ package body Styleg is ...@@ -1032,10 +1051,17 @@ package body Styleg is
-- In check token mode (-gnatyt), unary plus or minus must not be -- In check token mode (-gnatyt), unary plus or minus must not be
-- followed by a space. -- followed by a space.
procedure Check_Unary_Plus_Or_Minus is -- Annoying exception: if we have the sequence =>+ within a Depends pragma
-- or aspect, then we insist on a space rather than forbidding it.
procedure Check_Unary_Plus_Or_Minus (Inside_Depends : Boolean := False) is
begin begin
if Style_Check_Tokens then if Style_Check_Tokens then
Check_No_Space_After; if not Inside_Depends then
Check_No_Space_After;
else
Require_Following_Space;
end if;
end if; end if;
end Check_Unary_Plus_Or_Minus; end Check_Unary_Plus_Or_Minus;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
-- -- -- --
-- GNAT COMPILER COMPONENTS -- -- GNAT COMPILER COMPONENTS --
-- -- -- --
-- S T Y L E G -- -- S T Y L E G --
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -52,8 +52,10 @@ package Styleg is ...@@ -52,8 +52,10 @@ package Styleg is
procedure Check_Apostrophe; procedure Check_Apostrophe;
-- Called after scanning an apostrophe to check spacing -- Called after scanning an apostrophe to check spacing
procedure Check_Arrow; procedure Check_Arrow (Inside_Depends : Boolean := False);
-- Called after scanning out an arrow to check spacing -- Called after scanning out an arrow to check spacing. Inside_Depends is
-- true if the call is from an argument of the Depends pragma (where the
-- allowed/required format is =>+).
procedure Check_Attribute_Name (Reserved : Boolean); procedure Check_Attribute_Name (Reserved : Boolean);
-- The current token is an attribute designator. Check that it -- The current token is an attribute designator. Check that it
...@@ -143,8 +145,10 @@ package Styleg is ...@@ -143,8 +145,10 @@ package Styleg is
-- would interfere with coverage testing). Handles case of THEN ABORT as -- would interfere with coverage testing). Handles case of THEN ABORT as
-- an exception, as well as PRAGMA after ELSE. -- an exception, as well as PRAGMA after ELSE.
procedure Check_Unary_Plus_Or_Minus; procedure Check_Unary_Plus_Or_Minus (Inside_Depends : Boolean := False);
-- Called after scanning a unary plus or minus to check spacing -- Called after scanning a unary plus or minus to check spacing. The flag
-- Inside_Depends is set if we are scanning within a Depends pragma or
-- Aspect, in which case =>+ requires a following space).
procedure Check_Vertical_Bar; procedure Check_Vertical_Bar;
-- Called after scanning a vertical bar to check spacing -- Called after scanning a vertical bar to check spacing
......
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