]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2009-04-24 Vincent Celier <celier@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Apr 2009 10:25:20 +0000 (10:25 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Apr 2009 10:25:20 +0000 (10:25 +0000)
* 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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146693 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/opt.ads
gcc/ada/prj-nmsc.adb
gcc/ada/sem_ch7.adb

index ce28114bb5d6e8aeca5fbf5acbd76d2b3a0ea738..ec8255b6e718e12f21d55805657d3297aae26561 100644 (file)
@@ -1,3 +1,14 @@
+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>
 
        * s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the
index 9b8cf0b43095fe8b041495eb2b8c6d1383eb5050..229babfff00f028cf637a7f5c9ff3f8e599891ef 100644 (file)
@@ -1166,6 +1166,12 @@ package Opt is
    --  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.
 
+   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;
    --  GNAT, GNATPREP
    --  Set to True by switch -u of gnatprep or -u in the preprocessing data
index 5098883dee9c8ae811a83b0f3a23951a5742a14f..451c6783383fd722fd1c5bd9532ebf783bc12687 100644 (file)
@@ -3461,7 +3461,9 @@ package body Prj.Nmsc is
                         Continuation := Continuation_String'Access;
                      end if;
 
-                  elsif Data.Library_Kind /= Static then
+                  elsif (not Unchecked_Shared_Lib_Imports)
+                        and then Data.Library_Kind /= Static
+                  then
                      Error_Msg
                        (Project, In_Tree,
                         Continuation.all &
@@ -3485,17 +3487,18 @@ package body Prj.Nmsc is
                      "shared library project %% cannot extend static " &
                      "library project %%",
                      Data.Location);
+                  Continuation := Continuation_String'Access;
 
-               else
+               elsif not Unchecked_Shared_Lib_Imports then
                   Error_Msg
                     (Project, In_Tree,
                      Continuation.all &
                      "shared library project %% cannot import static " &
                      "library project %%",
                      Data.Location);
+                  Continuation := Continuation_String'Access;
                end if;
 
-               Continuation := Continuation_String'Access;
             end if;
          end if;
       end Check_Library;
index 54d4a29906549e9c9a81631ff627a83afd1a22e1..5cff94493994f8386e01c446e00380e827289205 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 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 --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -2146,8 +2146,8 @@ package body Sem_Ch7 is
          then
             if not Has_Private_Declaration (Etype (Id)) then
 
-               --  We assume that the user did not intend a deferred
-               --  constant declaration, and the expression is just missing.
+               --  We assume that the user did not intend a deferred constant
+               --  declaration, and the expression is just missing.
 
                Error_Msg_N
                  ("constant declaration requires initialization expression",