r260471 - in /trunk/gcc: ada/ChangeLog ada/free...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Mon May 21 14:52:00 GMT 2018
Author: pmderodat
Date: Mon May 21 14:52:36 2018
New Revision: 260471
URL: https://gcc.gnu.org/viewcvs?rev=260471&root=gcc&view=rev
Log:
[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.
Added:
trunk/gcc/testsuite/gnat.dg/suppress_initialization.adb
trunk/gcc/testsuite/gnat.dg/suppress_initialization_pkg.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/freeze.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list