[Ada] GNATmake fails to detect missing body

Pierre-Marie de Rodat derodat@adacore.com
Tue Jul 31 09:57:00 GMT 2018


This patch corrects an issue whereby building a multi-unit compilation with
missing sources resulted in a cryptic "code generation" error instead of the
appropriate file not found error.

------------
-- Source --
------------

--  main.adb

with Types;
procedure Main is
begin
   null;
end;

--  types.ads

package Types is
  procedure Force;
end;

----------------------------
-- Compilation and output --
----------------------------

& gnatmake -q main.adb
gnatmake: "types.adb" not found

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

2018-07-31  Justin Squirek  <squirek@adacore.com>

gcc/ada/

	* lib-writ.adb (Write_With_Lines): Modfiy the generation of
	dependencies within ali files so that source unit bodies are
	properly listed even if said bodies are missing.  Perform legacy
	behavior in GNATprove mode.
	* lib-writ.ads: Modify documentation to reflect current behavior.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3555 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180731/59a5b127/attachment.bin>


More information about the Gcc-patches mailing list