+2011-08-04 Yannick Moy <moy@adacore.com>
+
+ * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
+ opt.ads, lib-xref.ads: Code clean up.
+
+2011-08-04 Yannick Moy <moy@adacore.com>
+
+ * gnat_rm.texi: Update description of Test_Case
+ * gnat_ugn.texi: Typo.
+
+2011-08-04 Ed Falis <falis@adacore.com>
+
+ * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
+
+2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
+ it is of type Root_Controlled. This action eliminates fields Prev and
+ Next from type equality.
+
+2011-08-04 Yannick Moy <moy@adacore.com>
+
+ * lib-xref-alfa.adb: Correct typo.
+
+2011-08-04 Matthew Heaney <heaney@adacore.com>
+
+ * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
+ component.
+
2011-08-04 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2011, 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- --
Busy : Natural := 0;
Lock : Natural := 0;
Free : Count_Type'Base := -1;
- Nodes : Nodes_Type (1 .. Capacity);
+ Nodes : Nodes_Type (1 .. Capacity) := (others => <>);
Buckets : Buckets_Type (1 .. Modulus) := (others => 0);
end record;
end Generic_Bounded_Hash_Table_Types;
if ((status & 1) != 0)
cores = res;
-#elif defined (__WRS_CONFIG_SMP)
+#elif defined (_WRS_CONFIG_SMP)
unsigned int vxCpuConfiguredGet (void);
cores = vxCpuConfiguredGet ();
elsif Chars (C) = Name_uTag then
return Suitable_Element (Next_Entity (C));
+ -- The .NET/JVM version of type Root_Controlled contains two fields
+ -- which should not be considered part of the object. To achieve
+ -- proper equiality between two controlled objects on .NET/JVM, skip
+ -- field _parent whenever it is of type Root_Controlled.
+
+ elsif Chars (C) = Name_uParent
+ and then VM_Target /= No_VM
+ and then Etype (C) = RTE (RE_Root_Controlled)
+ then
+ return Suitable_Element (Next_Entity (C));
+
elsif Is_Interface (Etype (C)) then
return Suitable_Element (Next_Entity (C));
@smallexample @c ada
pragma Test_Case (
- [Name =>] String_Expression
+ [Name =>] static_string_Expression
,[Mode =>] (Normal | Robustness)
[, Requires => Boolean_Expression]
[, Ensures => Boolean_Expression]);
package Math_Functions is
...
function Sqrt (Arg : Float) return Float;
- pragma Test_Case (Name => ``Test_1``,
+ pragma Test_Case (Name => "Test 1",
Mode => Normal,
Requires => Arg < 100,
Ensures => Sqrt'Result < 10);
end Math_Functions;
@end smallexample
+@noindent
+The meaning of a test case is that, if the associated subprogram is
+executed in a context where @code{Requires} holds, then @code{Ensures}
+should hold when the subprogram returns. Mode @code{Normal} indicates
+that the input context should satisfy the normal precondition of the
+subprogram, and the output context should then satisfy its
+postcondition. More @code{Robustness} indicates that the normal pre- and
+postcondition of the subprogram should be ignored for this test case.
+
@node Pragma Thread_Local_Storage
@unnumberedsec Pragma Thread_Local_Storage
@findex Thread_Local_Storage
The environment task stack, e.g., the stack that contains the main unit, is
only processed when the environment variable GNAT_STACK_LIMIT is set.
-@noident
+@noindent
The package @code{GNAT.Task_Stack_Usage} provides facilities to get
stack usage reports at run-time. See its body for the details.
function Is_Global_Constant (E : Entity_Id) return Boolean is
begin
- return Ekind (E) in E_Constant
+ return Ekind (E) = E_Constant
and then Ekind_In (Scope (E), E_Package, E_Package_Body);
end Is_Global_Constant;
-- e = end of spec
-- H = abstract type
-- i = implicit reference
- -- I = object definition with initialization
-- k = implicit reference to parent unit in child unit
-- l = label on END line
-- m = modification
-- the generation of Why code for those parts of the input code that
-- belong to the ALFA subset of Ada. Set by debuf flag -gnatd.F.
- SPARK_Mode : Boolean := False;
- -- Reject constructs not allowed by SPARK. Set by flag -gnatd.D.
-
private
-- The following type is used to save and restore settings of switches in
-- Start of processing for Analyze_Declarations
begin
- if SPARK_Mode or else Restriction_Check_Required (SPARK) then
+ if Restriction_Check_Required (SPARK) then
Check_Later_Vs_Basic_Declarations (L, During_Parsing => False);
end if;
-- Start of processing for Analyze_Call
begin
- if SPARK_Mode or else Restriction_Check_Required (SPARK) then
+ if Restriction_Check_Required (SPARK) then
Check_Mixed_Parameter_And_Named_Associations;
end if;
-- Now issue the warning (or error in formal mode)
- if SPARK_Mode or else Restriction_Check_Required (SPARK) then
+ if Restriction_Check_Required (SPARK) then
Check_SPARK_Restriction
("unreachable code is not allowed", Error_Node);
else
-- Selector name cannot be a character literal or an operator symbol in
-- SPARK, except for the operator symbol in a renaming.
- if SPARK_Mode or else Restriction_Check_Required (SPARK) then
+ if Restriction_Check_Required (SPARK) then
if Nkind (Selector_Name (N)) = N_Character_Literal then
Check_SPARK_Restriction
("character literal cannot be prefixed", N);
-- Selector name is restricted in SPARK
if Nkind (N) = N_Expanded_Name
- and then (SPARK_Mode or else Restriction_Check_Required (SPARK))
+ and then Restriction_Check_Required (SPARK)
then
if Is_Subprogram (P_Name) then
Check_SPARK_Restriction
-- subprogram bodies. Detect those cases by testing whether
-- Process_End_Label was called for a body (Typ = 't') or a package.
- if (SPARK_Mode or else Restriction_Check_Required (SPARK))
+ if Restriction_Check_Required (SPARK)
and then (Typ = 't' or else Ekind (Ent) = E_Package)
then
Error_Msg_Node_1 := Endl;