When gnatmake is invoked on a project file where there are unit names
with non ASCII characters that have a specific naming scheme, the
the compiler is unable to find the correct source file names.
This patch corrects this.
The test is to run gnatmake on a project such as:

project Prj is
   for Main use ("main.adb");
   package Naming is
     for Spec ("C250002_["C1"]") use "c250002_aa.ads";
     for Body ("C250002_["C1"]") use "c250002_aa.adb";
   end Naming;
end Prj;

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-09-01  Vincent Celier  <cel...@adacore.com>

        * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
        exceptions in the config pragmas file.

Index: prj-env.adb
===================================================================
--- prj-env.adb (revision 178381)
+++ prj-env.adb (working copy)
@@ -526,9 +526,10 @@
          while Element (Iter) /= No_Source loop
             Source := Element (Iter);
 
-            if Source.Index >= 1
-              and then not Source.Locally_Removed
+            if not Source.Locally_Removed
               and then Source.Unit /= null
+              and then
+                (Source.Index >= 1 or else Source.Naming_Exception)
             then
                Put (Source);
             end if;

Reply via email to