[Ada] Disable anonymous allocator warning for library-level objects
authorJustin Squirek <squirek@adacore.com>
Tue, 13 Aug 2019 08:06:50 +0000 (08:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 13 Aug 2019 08:06:50 +0000 (08:06 +0000)
commit943c82d7b9bc15161ac344953b2deb0a4121b279
treef7ff9f56183bae7ac7082c37f833291f644f1faa
parent114042b8861a33ec7227c5ac2967058ee60c248f
[Ada] Disable anonymous allocator warning for library-level objects

This patch modifies the behavior of anonymous allocator warnings so that
they no longer get triggered in the case of an object declaration at
library-level.

2019-08-13  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* exp_ch4.adb (Expand_N_Allocator): Add condition to detect
library-level object declarations

gcc/testsuite/

* gnat.dg/anon3.adb, gnat.dg/anon3.ads: New testcase.

From-SVN: r274338
gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/anon3.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/anon3.ads [new file with mode: 0644]