+2014-08-04 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch4.adb: Minor reformatting.
+
+2014-08-04 Olivier Hainque <hainque@adacore.com>
+
+ * link.c: remove const on __gnat_objlist_file_supported for AIX
+
+2014-08-04 Robert Dewar <dewar@adacore.com>
+
+ * sem_util.ads: Minor addition of comment.
+
+2014-08-04 Vincent Celier <celier@adacore.com>
+
+ * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
+ all projects, including aggregate and aggregate library projects.
+
+2014-08-04 Yannick Moy <moy@adacore.com>
+
+ * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
+
+2014-08-04 Robert Dewar <dewar@adacore.com>
+
+ * sem_eval.adb (Test_In_Range): Always in range for
+ Is_Known_Valid target type, where input type has smaller or
+ equal size and does not have biased rep.
+
+2014-08-04 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_attr.adb (Eval_Attribute): Constrained is not treated as
+ a static attribute, and the Static flag must not be set on it
+ during resolution. It may be constant-folded during expansion,
+ but if expansion is disabled it is not a static expression.
+
2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
Nat (Physical_To_Logical (Last_Source_Line (J), J));
end loop;
- -- Deal with case of generating SCIL, we should not be here!
+ -- Deal with case of generating SCIL, we should not be here unless
+ -- debugging CodePeer mode in GNAT.
if Generate_SCIL then
Error_Msg_N ("'S'C'I'L generation not available", Cunit (Main_Unit));
end if;
end if;
+ -- We should be here in GNATprove mode only when debugging GNAT. Do not
+ -- call gigi in that case, as it is not prepared to handle the special
+ -- form of the tree obtained in GNATprove mode.
+
+ if GNATprove_Mode then
+ return;
+ end if;
+
-- The actual call to the back end
gigi
-- If the level of the operand type is statically deeper than the
-- level of the target type, then force Program_Error. Note that this
-- can only occur for cases where the attribute is within the body of
- -- an instantiation (otherwise the conversion will already have been
- -- rejected as illegal). (Note: warnings are issued by the analyzer
- -- for the instance cases.) The case where the target type is an
- -- anonymous access type of a discriminant is excluded, because the
- -- level of such a type depends on the context and currently the
- -- level returned for such types is zero, resulting in warnings about
- -- about check failures in certain legal cases involving class-wide
- -- interfaces as the designated type (some cases, such as return
- -- statements, are checked at run time, but not clear if these are
- -- handled right in general, see 3.10.2(12/2-12.5/3) ???).
+ -- an instantiation, otherwise the conversion will already have been
+ -- rejected as illegal.
+
+ -- Note: warnings are issued by the analyzer for the instance cases
elsif In_Instance_Body
+
+ -- The case where the target type is an anonymous access type of
+ -- a discriminant is excluded, because the level of such a type
+ -- depends on the context and currently the level returned for such
+ -- types is zero, resulting in warnings about about check failures
+ -- in certain legal cases involving class-wide interfaces as the
+ -- designated type (some cases, such as return statements, are
+ -- checked at run time, but not clear if these are handled right
+ -- in general, see 3.10.2(12/2-12.5/3) ???).
+
and then
not (Ekind (Target_Type) = E_Anonymous_Access_Type
and then Present (Associated_Node_For_Itype (Target_Type))
* *
* C Implementation File *
* *
- * 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 *
* terms of the GNU General Public License as published by the Free Soft- *
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 15000;
-const unsigned char __gnat_objlist_file_supported = 1;
+unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";
Project_Qualifier_Of (Project, In_Tree);
Name : constant Name_Id := Name_Of (Current_Package, In_Tree);
begin
- if (Qualif = Aggregate and then Name /= Snames.Name_Builder)
- or else (Qualif = Aggregate_Library
- and then Name /= Snames.Name_Builder
- and then Name /= Snames.Name_Install)
+ if Name /= Snames.Name_Ide
+ and then
+ ((Qualif = Aggregate and then Name /= Snames.Name_Builder)
+ or else
+ (Qualif = Aggregate_Library and then Name /= Snames.Name_Builder
+ and then Name /= Snames.Name_Install))
then
Error_Msg_Name_1 := Name;
Error_Msg
-- could be handled at compile time. To be looked at later.
when Attribute_Constrained =>
+
+ -- The expander might fold it and set the static flag accordingly,
+ -- but with expansion disabled (as in ASIS), it remains as an
+ -- attribute reference, and this reference is not static.
+
+ Set_Is_Static_Expression (N, False);
null;
---------------
then
return In_Range;
+ -- Another special case. For signed integer types, if the target type
+ -- has Is_Known_Valid set, and the source type does not have a larger
+ -- size, then the source value must be in range. We exclude biased
+ -- types, because they bizarrely can generate out of range values.
+
+ elsif Is_Signed_Integer_Type (Etype (N))
+ and then Is_Known_Valid (Typ)
+ and then Esize (Etype (N)) <= Esize (Typ)
+ and then not Has_Biased_Representation (Etype (N))
+ then
+ return In_Range;
+
-- For all other cases, result is unknown
else
-- declaration.
function Is_SPARK_Object_Reference (N : Node_Id) return Boolean;
- -- Determines if the tree referenced by N represents an object in SPARK
+ -- Determines if the tree referenced by N represents an object in SPARK.
+ -- This differs from Is_Object_Reference in that ???
function Is_Statement (N : Node_Id) return Boolean;
pragma Inline (Is_Statement);