+2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_prag.adb (Analyze_Input_List): Detect an illegal dependency
+ clause where both input and output lists are null.
+ (Analyze_Pragma): Update the grammar of pragma Depends.
+
+2013-04-12 Vincent Celier <celier@adacore.com>
+
+ * gnatbind.adb (No_Restriction_List): Exclude restrictions that
+ take a parameter value, not a count.
+ * prj.ads, prj.adb (Remove_All_Restricted_Languages): New procedure.
+ * projects.texi: Complete documentation of attribute Roots.
+
+2013-04-12 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch3.adb, exp_util.ads, checks.adb, freeze.adb, sem_attr.adb,
+ sem_ch3.adb: Minor reformatting.
+ * exp_ch4.adb (Size_In_Storage_Elements): Minor documentation
+ improvement: note that the computation is pessimistic for bit
+ packed arrays.
+ * gnat_rm.texi (Range_Length): Fix minor error in description
+ of attribute.
+
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb (Find_Aspect): New routine.
elsif Dsiz <= Standard_Long_Long_Integer_Size then
Ctyp := Standard_Long_Long_Integer;
- -- No check type exists, use runtime call
+ -- No check type exists, use runtime call
else
if Nkind (N) = N_Op_Add then
-- Loop through components, skipping pragmas, in 2 steps. The first
-- step deals with regular components. The second step deals with
- -- components have per object constraints, and no explicit initia-
- -- lization.
+ -- components that have per object constraints and no explicit
+ -- initialization.
Has_POC := False;
-- Leave any processing of per-object constrained component for
-- the second pass.
- if Has_Access_Constraint (Id)
- and then No (Expression (Decl))
- then
+ if Has_Access_Constraint (Id) and then No (Expression (Decl)) then
Has_POC := True;
-- Regular component cases
-- are too large, and which in the absence of a check results in
-- undetected chaos ???
+ -- Note in particular that this is a pessimistic estimate in the
+ -- case of packed array types, where an array element might occupy
+ -- just a fraction of a storage element???
+
declare
Len : Node_Id;
Res : Node_Id;
-- This procedure ensures that type referenced by Typ is defined. For the
-- case of a type other than an Itype, nothing needs to be done, since
-- all such types have declaration nodes. For Itypes, an N_Itype_Reference
- -- node is generated and inserted at the given node N. This is typically
+ -- node is generated and inserted as an action on node N. This is typically
-- used to ensure that an Itype is properly defined outside a conditional
-- construct when it is referenced in more than one branch.
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, 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- --
Set_Is_Packed (Btyp);
Set_Has_Non_Standard_Rep (Btyp);
- -- Otherwise give an error message
+ -- Otherwise give an error message
else
Error_Msg_NE
the number of values represented by the subtype (zero for a null
range). The result is static for static subtypes. @code{Range_Length}
applied to the index subtype of a one dimensional array always gives the
-same result as @code{Range} applied to the array itself.
+same result as @code{Length} applied to the array itself.
@node Ref
@unnumberedsec Ref
Max_Storage_At_Blocking => True,
-- Not checkable at compile time
+ No_Specification_Of_Aspect => True,
+ -- Requires a parameter value, not a count
+
+ No_Use_Of_Attribute => True,
+ -- Requires a parameter value, not a count
+
+ No_Use_Of_Pragma => True,
+ -- Requires a parameter value, not a count
+
others => False);
Additional_Restrictions_Listed : Boolean := False;
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2013, 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- --
new Restricted_Lang'(Name => Name_Find, Next => Restricted_Languages);
end Add_Restricted_Language;
+ -------------------------------------
+ -- Remove_All_Restricted_Languages --
+ -------------------------------------
+
+ procedure Remove_All_Restricted_Languages is
+ begin
+ Restricted_Languages := null;
+ end Remove_All_Restricted_Languages;
+
-------------------
-- Add_To_Buffer --
-------------------
-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2013, 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- --
-- Call by gprbuild for each language specify by switch
-- --restricted-to-languages=.
+ procedure Remove_All_Restricted_Languages;
+ -- Call by gprbuild in CodePeer mode to ignore switches
+ -- --restricted-to-languages=.
+
function Is_Allowed_Language (Name : Name_Id) return Boolean;
-- Returns True if --restricted-to-languages= is not used or if Name
-- is one of the restricted languages.
Gprbuild_Flags : constant Processing_Flags;
Gprclean_Flags : constant Processing_Flags;
+ Gprexec_Flags : constant Processing_Flags;
Gnatmake_Flags : constant Processing_Flags;
-- Flags used by the various tools. They all display the error messages
-- through Prj.Err.
Missing_Source_Files => Error,
Ignore_Missing_With => False);
+ Gprexec_Flags : constant Processing_Flags :=
+ (Report_Error => null,
+ When_No_Sources => Silent,
+ Require_Sources_Other_Lang => False,
+ Allow_Duplicate_Basenames => False,
+ Compiler_Driver_Mandatory => False,
+ Error_On_Unknown_Language => True,
+ Require_Obj_Dirs => Silent,
+ Allow_Invalid_External => Error,
+ Missing_Source_Files => Silent,
+ Ignore_Missing_With => False);
+
Gnatmake_Flags : constant Processing_Flags :=
(Report_Error => null,
When_No_Sources => Error,
-- null
-- | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}
- -- DEPENDENCY_CLAUSE ::= OUTPUT_LIST =>[+] INPUT_LIST
+ -- DEPENDENCY_CLAUSE ::=
+ -- OUTPUT_LIST =>[+] INPUT_LIST
+ -- | NULL_DEPENDENCY_CLAUSE
- -- OUTPUT_LIST ::= null | OUTPUT | (OUTPUT {, OUTPUT})
+ -- NULL_DEPENDENCY_CLAUSE ::= null => INPUT_LIST
+
+ -- OUTPUT_LIST ::= OUTPUT | (OUTPUT {, OUTPUT})
-- INPUT_LIST ::= null | INPUT | (INPUT {, INPUT})
Seen => Inputs_Seen,
Null_Seen => Null_Input_Seen);
end if;
+
+ -- Detect an illegal dependency clause of the form
+
+ -- (null =>[+] null)
+
+ if Null_Output_Seen and then Null_Input_Seen then
+ Error_Msg_N
+ ("null dependency clause cannot have a null input list",
+ Inputs);
+ end if;
end Analyze_Input_List;
--------------------------