[Ada] GNAT.Compiler_Version and LTO

Pierre-Marie de Rodat derodat@adacore.com
Fri Jun 18 08:38:26 GMT 2021


When mixing GNAT.Compiler_Version and LTO, a warning about a type
mismatch between the import and export of __gnat_version is generated.

Fixed by introducing a level of indirection.

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

gcc/ada/

	* bindgen.adb (Gen_Output_File_Ada): Generate a new constant
	GNAT_Version_Address.
	* libgnat/g-comver.adb (GNAT_Version_Address): New;
	(GNAT_Version): Use GNAT_Version_Address to disable LTO warning.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1964 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210618/9cea8933/attachment-0001.bin>


More information about the Gcc-patches mailing list