+2015-01-06 Vincent Celier <celier@adacore.com>
+
+ * prj-conf.adb (Check_Target): Improve error message when
+ there are mismatched targets between the on in the configuration
+ project file and the specified one, either in the main project
+ file or in the --target= switch.
+
+2015-01-06 Pascal Obry <obry@adacore.com>
+
+ * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
+ Install_Name attribute definitions.
+
+2015-01-06 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
+ generated Import pragma for the internal imported procedure does
+ not come from an aspect, so that Is_Imported can be properly
+ set for it.
+
+2015-01-06 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_ch12.adb (Might_Inline_Subp): Record whether
+ any subprograms in the generic package are marked with
+ pragma Inline_Always (setting flag Has_Inline_Always).
+ (Analyze_Package_Instantiation): Add test of Has_Inline_Always
+ alongside existing test of Front_End_Inlining as alternative
+ conditions for setting Inline_Now. Also add test of
+ Has_Inline_Always along with Front_End_Inlining test as an
+ alternative condition for setting Needs_Body to False.
+
+2015-01-06 Tristan Gingold <gingold@adacore.com>
+
+ * i-cpoint.adb (Copy_Array): Handle overlap.
+
2015-01-06 Pascal Obry <obry@adacore.com>
* bindgen.adb: Minor style fix.
-- generates the right visibility, and that is exactly what the
-- calls to Copy_Separate_Tree give us.
- -- Acquire copy of Inline pragma
+ -- Acquire copy of Inline pragma, and indicate that it does not
+ -- come from an aspect, as it applies to an internal entity.
Iprag := Copy_Separate_Tree (Import_Pragma (E));
+ Set_From_Aspect_Specification (Iprag, False);
-- Fix up spec to be not imported any more
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, 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- --
Target : Pointer;
Length : ptrdiff_t)
is
- T : Pointer := Target;
- S : Pointer := Source;
+ T : Pointer;
+ S : Pointer;
begin
- if S = null or else T = null then
+ if Source = null or else Target = null then
raise Dereference_Error;
- else
+ elsif To_Addr (Target) <= To_Addr (Source) then
+ -- Forward copy
+ T := Target;
+ S := Source;
+
for J in 1 .. Length loop
T.all := S.all;
Increment (T);
Increment (S);
end loop;
+
+ else
+ -- Backward copy
+ T := Target + Length;
+ S := Source + Length;
+
+ for J in 1 .. Length loop
+ Decrement (T);
+ Decrement (S);
+ T.all := S.all;
+ end loop;
end if;
end Copy_Array;
"SVproject_subdir#" &
"SVactive#" &
"LAartifacts#" &
+ "SVmode#" &
+ "SVinstall_name#" &
-- package Remote
else
if Tgt_Name /= No_Name then
Raise_Invalid_Config
- ("invalid target name """
- & Get_Name_String (Tgt_Name) & """ in configuration");
+ ("mismatched targets: """
+ & Get_Name_String (Tgt_Name) & """ in configuration, """
+ & Target & """ specified");
else
Raise_Invalid_Config
("no target specified in configuration file");
Subdirectory of @b{Prefix} where the generated project file is to be
installed. Default is @b{share/gpr}.
+
+@item @b{Mode}
+
+The installation mode, it is either @b{dev} (default) or @b{usage}.
+See @b{gprbuild} user's guide for details.
+
+@item @b{Install_Name}
+
+Specify the name to use for recording the installation. The default is
+the project name without the extension.
@end table
@c ---------------------------------------------
"false" means that the project is not to be installed, all other values mean
that the project is to be installed.
+@item @b{Mode}: single
+
+Value is the installation mode, it is either @b{dev} (default) or @b{usage}.
+
+@item @b{Install_Name}: single
+
+Specify the name to use for recording the installation. The default is
+the project name without the extension.
+
@end itemize
@node Package Linker Attributes
Is_Actual_Pack : constant Boolean :=
Is_Internal (Defining_Entity (N));
- Env_Installed : Boolean := False;
- Parent_Installed : Boolean := False;
- Renaming_List : List_Id;
- Unit_Renaming : Node_Id;
- Needs_Body : Boolean;
- Inline_Now : Boolean := False;
+ Env_Installed : Boolean := False;
+ Parent_Installed : Boolean := False;
+ Renaming_List : List_Id;
+ Unit_Renaming : Node_Id;
+ Needs_Body : Boolean;
+ Inline_Now : Boolean := False;
+ Has_Inline_Always : Boolean := False;
Save_IPSM : constant Boolean := Ignore_Pragma_SPARK_Mode;
-- Save flag Ignore_Pragma_SPARK_Mode for restore on exit
E := First_Entity (Gen_Unit);
while Present (E) loop
if Is_Subprogram (E) and then Is_Inlined (E) then
+ -- Remember if there are any subprograms with Inline_Always
+
+ if Has_Pragma_Inline_Always (E) then
+ Has_Inline_Always := True;
+ end if;
+
return True;
end if;
end loop;
end if;
- -- If front-end inlining is enabled, and this is a unit for which
- -- code will be generated, we instantiate the body at once.
+ -- If front-end inlining is enabled or there are any subprograms
+ -- marked with Inline_Always, and this is a unit for which code
+ -- will be generated, we instantiate the body at once.
-- This is done if the instance is not the main unit, and if the
-- generic is not a child unit of another generic, to avoid scope
and then not Is_Actual_Pack
then
if not Back_End_Inlining
- and then Front_End_Inlining
+ and then (Front_End_Inlining or else Has_Inline_Always)
and then (Is_In_Main_Unit (N)
or else In_Main_Context (Current_Scope))
and then Nkind (Parent (N)) /= N_Compilation_Unit
or else (Operating_Mode = Check_Semantics
and then (ASIS_Mode or GNATprove_Mode)));
- -- If front_end_inlining is enabled, do not instantiate body if
- -- within a generic context.
+ -- If front-end inlining is enabled or there are any subprograms
+ -- marked with Inline_Always, do not instantiate body when within
+ -- a generic context.
- if (Front_End_Inlining and then not Expander_Active)
+ if ((Front_End_Inlining or else Has_Inline_Always)
+ and then not Expander_Active)
or else Is_Generic_Unit (Cunit_Entity (Main_Unit))
then
Needs_Body := False;
Name_Include_Path_File : constant Name_Id := N + $;
Name_Inherit_Source_Path : constant Name_Id := N + $;
Name_Install : constant Name_Id := N + $;
+ Name_Install_Name : constant Name_Id := N + $;
Name_Languages : constant Name_Id := N + $;
Name_Language_Kind : constant Name_Id := N + $;
Name_Leading_Library_Options : constant Name_Id := N + $;