Commit c54ab0b5 by Arnaud Charlet

[multiple changes]

2009-04-24  Vincent Celier  <celier@adacore.com>

	* opt.ads (Unchecked_Shared_Lib_Imports): New Boolean flag.

	* prj-nmsc.adb (Check_Library): No error for imports by shared library
	projects, when --unchecked-shared-lib-imports is used.

2009-04-24  Robert Dewar  <dewar@adacore.com>

	* sem_ch7.adb: Minor reformatting

From-SVN: r146693
parent b3520ca0
2009-04-24 Vincent Celier <celier@adacore.com>
* opt.ads (Unchecked_Shared_Lib_Imports): New Boolean flag.
* prj-nmsc.adb (Check_Library): No error for imports by shared library
projects, when --unchecked-shared-lib-imports is used.
2009-04-24 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb: Minor reformatting
2009-04-24 Tristan Gingold <gingold@adacore.com> 2009-04-24 Tristan Gingold <gingold@adacore.com>
* s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the * s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the
......
...@@ -1166,6 +1166,12 @@ package Opt is ...@@ -1166,6 +1166,12 @@ package Opt is
-- the other hand, most such blowups will be caught cleanly and simply -- the other hand, most such blowups will be caught cleanly and simply
-- say compilation abandoned. This flag is set to True by -gnatq or -gnatQ. -- say compilation abandoned. This flag is set to True by -gnatq or -gnatQ.
Unchecked_Shared_Lib_Imports : Boolean := False;
-- GPRBUILD
-- Set to True when shared library projects are allowed to import projects
-- that are not shared library projects. Set by switch
-- --unchecked-shared-lib-imports.
Undefined_Symbols_Are_False : Boolean := False; Undefined_Symbols_Are_False : Boolean := False;
-- GNAT, GNATPREP -- GNAT, GNATPREP
-- Set to True by switch -u of gnatprep or -u in the preprocessing data -- Set to True by switch -u of gnatprep or -u in the preprocessing data
......
...@@ -3461,7 +3461,9 @@ package body Prj.Nmsc is ...@@ -3461,7 +3461,9 @@ package body Prj.Nmsc is
Continuation := Continuation_String'Access; Continuation := Continuation_String'Access;
end if; end if;
elsif Data.Library_Kind /= Static then elsif (not Unchecked_Shared_Lib_Imports)
and then Data.Library_Kind /= Static
then
Error_Msg Error_Msg
(Project, In_Tree, (Project, In_Tree,
Continuation.all & Continuation.all &
...@@ -3485,17 +3487,18 @@ package body Prj.Nmsc is ...@@ -3485,17 +3487,18 @@ package body Prj.Nmsc is
"shared library project %% cannot extend static " & "shared library project %% cannot extend static " &
"library project %%", "library project %%",
Data.Location); Data.Location);
Continuation := Continuation_String'Access;
else elsif not Unchecked_Shared_Lib_Imports then
Error_Msg Error_Msg
(Project, In_Tree, (Project, In_Tree,
Continuation.all & Continuation.all &
"shared library project %% cannot import static " & "shared library project %% cannot import static " &
"library project %%", "library project %%",
Data.Location); Data.Location);
Continuation := Continuation_String'Access;
end if; end if;
Continuation := Continuation_String'Access;
end if; end if;
end if; end if;
end Check_Library; end Check_Library;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -2146,8 +2146,8 @@ package body Sem_Ch7 is ...@@ -2146,8 +2146,8 @@ package body Sem_Ch7 is
then then
if not Has_Private_Declaration (Etype (Id)) then if not Has_Private_Declaration (Etype (Id)) then
-- We assume that the user did not intend a deferred -- We assume that the user did not intend a deferred constant
-- constant declaration, and the expression is just missing. -- declaration, and the expression is just missing.
Error_Msg_N Error_Msg_N
("constant declaration requires initialization expression", ("constant declaration requires initialization expression",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment