+2009-11-30 Robert Dewar <dewar@adacore.com>
+
+ * osint.adb, prj-nmsc.adb, sem_prag.adb, sem_util.adb: Minor
+ reformatting.
+ * csinfo.adb: Terminate run if improper use of reserved flag
+ * sinfo.ads, sinfo.adb (Is_Accessibility_Actual): Don't use reserved
+ Flag12, used Flag13 instead.
+
2009-11-30 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Check_Files): Recognize documented switches that have a
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, 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- --
-- --
------------------------------------------------------------------------------
--- Program to check consistency of sinfo.ads and sinfo.adb. Checks that
--- field name usage is consistent and that assertion cross-reference lists
--- are correct, as well as making sure that all the comments on field name
--- usage are consistent.
+-- Program to check consistency of sinfo.ads and sinfo.adb. Checks that field
+-- name usage is consistent and that assertion cross-reference lists are
+-- correct, as well as making sure that all the comments on field name usage
+-- are consistent.
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
if Bad then
Put_Line ("fields conflict with standard fields for node " & Node);
+ raise Done;
end if;
end loop;
if Buffer'Length <= Exec_Suffix'Length
or else
Buffer (Buffer'Last - Exec_Suffix'Length + 1 .. Buffer'Last)
- /= Exec_Suffix.all
+ /= Exec_Suffix.all
then
Name_Buffer
(Name_Len + 1 .. Name_Len + Exec_Suffix'Length) :=
- Exec_Suffix.all;
+ Exec_Suffix.all;
Name_Len := Name_Len + Exec_Suffix'Length;
Free (Exec_Suffix);
return Name_Find;
Data.Tree);
Library_Interface : constant Prj.Variable_Value :=
- Prj.Util.Value_Of
- (Snames.Name_Library_Interface,
- Project.Decl.Attributes,
- Data.Tree);
+ Prj.Util.Value_Of
+ (Snames.Name_Library_Interface,
+ Project.Decl.Attributes,
+ Data.Tree);
List : String_List_Id;
Element : String_Element;
Project.Interfaces_Defined := True;
- elsif Project.Extends /= No_Project and then
- Project.Extends.Interfaces_Defined
+ elsif Project.Extends /= No_Project
+ and then Project.Extends.Interfaces_Defined
then
Project.Interfaces_Defined := True;
-- Annotate --
--------------
- -- pragma Annotate (IDENTIFIER, [IDENTIFIER], {, ARG});
+ -- pragma Annotate (IDENTIFIER [, IDENTIFIER {, ARG}]);
-- ARG ::= NAME | EXPRESSION
- -- The first two arguments are by convention intended to refer
- -- to an external tool and a tool-specific function. These
- -- arguments are not analyzed.
+
+ -- The first two arguments are by convention intended to refer to an
+ -- external tool and a tool-specific function. These arguments are
+ -- not analyzed.
when Pragma_Annotate => Annotate : begin
GNAT_Pragma;
Exp : Node_Id;
begin
- -- Second unanalyzed parameter is optional.
+ -- Second unanalyzed parameter is optional
if No (Arg2) then
null;
function Is_Delegate (T : Entity_Id) return Boolean is
Desig_Type : Entity_Id;
+
begin
if VM_Target /= CLI_Target then
return False;
end if;
-- Access-to-subprograms are delegates in CIL
+
if Ekind (T) = E_Access_Subprogram_Type then
return True;
end if;
if Ekind (T) not in Access_Kind then
- -- a delegate is a managed pointer. If no designated type is defined
+
+ -- A delegate is a managed pointer. If no designated type is defined
-- it means that it's not a delegate.
+
return False;
end if;
end if;
-- Test if the type is inherited from [mscorlib]System.Delegate
+
while Etype (Desig_Type) /= Desig_Type loop
if Chars (Scope (Desig_Type)) /= No_Name
and then Is_Imported (Scope (Desig_Type))
function Is_Variable (N : Node_Id) return Boolean is
Orig_Node : constant Node_Id := Original_Node (N);
- -- We do the test on the original node, since this is basically a
- -- test of syntactic categories, so it must not be disturbed by
- -- whatever rewriting might have occurred. For example, an aggregate,
- -- which is certainly NOT a variable, could be turned into a variable
- -- by expansion.
+ -- We do the test on the original node, since this is basically a test
+ -- of syntactic categories, so it must not be disturbed by whatever
+ -- rewriting might have occurred. For example, an aggregate, which is
+ -- certainly NOT a variable, could be turned into a variable by
+ -- expansion.
function In_Protected_Function (E : Entity_Id) return Boolean;
-- Within a protected function, the private components of the
begin
pragma Assert (False
or else NT (N).Nkind = N_Parameter_Association);
- return Flag12 (N);
+ return Flag13 (N);
end Is_Accessibility_Actual;
function Is_Asynchronous_Call_Block
begin
pragma Assert (False
or else NT (N).Nkind = N_Parameter_Association);
- Set_Flag12 (N, Val);
+ Set_Flag13 (N, Val);
end Set_Is_Accessibility_Actual;
procedure Set_Is_Asynchronous_Call_Block
-- to the node for the spec of the instance, inserted as part of the
-- semantic processing for instantiations in Sem_Ch12.
- -- Is_Accessibility_Actual (Flag12-Sem)
+ -- Is_Accessibility_Actual (Flag13-Sem)
-- Present in N_Parameter_Association nodes. True if the parameter is
-- an extra actual that carries the accessibility level of the actual
-- for an access parameter, in a function that dispatches on result and
-- Selector_Name (Node2) (always non-Empty)
-- Explicit_Actual_Parameter (Node3)
-- Next_Named_Actual (Node4-Sem)
- -- Is_Accessibility_Actual (Flag12-Sem)
+ -- Is_Accessibility_Actual (Flag13-Sem)
---------------------------
-- 6.4 Actual Parameter --
(N : Node_Id) return Uint; -- Uint3
function Is_Accessibility_Actual
- (N : Node_Id) return Boolean; -- Flag12
+ (N : Node_Id) return Boolean; -- Flag13
function Is_Asynchronous_Call_Block
(N : Node_Id) return Boolean; -- Flag7
(N : Node_Id; Val : Uint); -- Uint3
procedure Set_Is_Accessibility_Actual
- (N : Node_Id; Val : Boolean := True); -- Flag12
+ (N : Node_Id; Val : Boolean := True); -- Flag13
procedure Set_Is_Asynchronous_Call_Block
(N : Node_Id; Val : Boolean := True); -- Flag7