On 1 Jul 2016, at 17:01, Stephen Leake <[email protected]> wrote:
> 
> Stephen Leake <[email protected]> writes:
> 
>> I'm having problems compiling the ada-mode test files with GNAT GPL
>> 2016.
>> 
>> In build/wisi/Makefile, the compile-ada target gives:
>> 
>> ada_mode.adb:3:04: warning: subunit "Ada_Mode.Separate_Protected_Body"
>> in file "ada_mode-separate_protected_body.adb" not found
>> 
>> 
>> I tried to work around that by adding "subdir" to ada_mode.gpr
>> Source_Files, and using ada_mode.gpr as the project file. That works
>> until I get:
>> 
>> ada_mode-nominal-separate_package_1.adb:41:04: warning: subunit
>> "Ada_Mode.Nominal.Separate_Package_1.Separate_Procedure_1" in file
>> "ada_mode-nominal-separate_package_1-separate_procedure_1.adb" not
>> found
> 
> Fixed this; there really is a missing file, that previous versions of
> GNAT did not report.

But see 

   procedure Separate_Procedure_1 is separate;
   procedure Separate_Procedure_2 (Item : in Integer) is separate;

I think this is because of -gnatc. Compiling without it, and with -k to carry 
on after errors, gives lots of errors about missing subunits, so whether or not 
the compiler sees them seems a bit random.

$ gnatmake -gnat2012 -P ada_mode_parent.gpr -c ada_mode-nominal.adb -k 
gcc -c -gnat2012 ada_mode-nominal.adb
ada_mode-nominal.adb:665:04: warning: subunit 
"Ada_Mode.Nominal.Separate_Package_1" in file 
"ada_mode-nominal-separate_package_1.adb" not found
ada_mode-nominal.ads:727:04: abstract inherited private operation "Function_2g" 
must be overridden (RM 3.9.3(10))

   compilation of ada_mode-nominal.adb failed

gprbuild: *** compilation phase failed
gcc -c -gnat2012 -I- -gnatA 
/Users/simon/ada-mode-wisi-mtn/test/ada_mode-nominal.adb
ada_mode-nominal.adb:665:04: warning: subunit 
"Ada_Mode.Nominal.Separate_Package_1" in file 
"ada_mode-nominal-separate_package_1.adb" not found
ada_mode-nominal.ads:727:04: abstract inherited private operation "Function_2g" 
must be overridden (RM 3.9.3(10))
gcc -c -gnat2012 -I- -gnatA /Users/simon/ada-mode-wisi-mtn/test/ada_mode.adb
cannot generate code for file ada_mode.adb (missing subunits)
ada_mode.adb:3:04: warning: subunit "Ada_Mode.Separate_Protected_Body" in file 
"ada_mode-separate_protected_body.adb" not found
ada_mode.adb:5:04: warning: task will be activated before elaboration of its 
body
ada_mode.adb:5:04: warning: Program_Error will be raised at run time
ada_mode.adb:9:04: warning: subunit "Ada_Mode.Separate_Task_Body" in file 
"ada_mode-separate_task_body.adb" not found
ada_mode.adb:11:04: warning: subunit "Ada_Mode.Separate_Procedure" in file 
"ada_mode-separate_procedure.adb" not found
ada_mode.adb:14:04: warning: subunit "Ada_Mode.Separate_Function" in file 
"ada_mode-separate_function.adb" not found
gnatmake: "/Users/simon/ada-mode-wisi-mtn/test/ada_mode-nominal.adb" 
compilation error
gnatmake: "/Users/simon/ada-mode-wisi-mtn/test/ada_mode.adb" compilation error

> The first error above is still mysterious.

See above.
GCC 6.1.0 reports yet another error, which I'm not pursuing at the moment 
because extracting the complained-of code into a smaller package compiles OK. 
GCC 5.2.0 is OK.

I had to add -c because in one case (I forget which) the compiler tried to link 
something unlinkable (this may have been with GCC 6.1.0)

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to