[Ada] Spurious warning on object declaration with address clause
The compiler warns on an object declaration with default initialization and an address clause, to indicate that the overlay implied by the address clause might affect a value elsewhere. The warning is suppressed if the type carries the Suppress_Initialization aspect. With this patch the compiler also inhibits the warning if the aspect is specified for the object itself. 2018-05-21 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * freeze.adb (Warn_Overlay): Do not emit a wawrning on an object declaration with an explicit address clause and a type with default initialization, if the declaration carries an aspect Suppress_Initialization. gcc/testsuite/ * gnat.dg/suppress_initialization.adb, gnat.dg/suppress_initialization_pkg.ads: New testcase. From-SVN: r260471
Showing
Please
register
or
sign in
to comment