diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-10-09 15:04:53 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-10-09 15:04:53 +0000 |
commit | 0ffbef9f3553b6f9841f01ac5ff61850af63b219 (patch) | |
tree | 7f1033869d9a3a083734be3e352ad606478c95ba /gcc/config.gcc | |
parent | 33b43b0d8cd2de722d177ef823930500948a7487 (diff) | |
download | gcc-0ffbef9f3553b6f9841f01ac5ff61850af63b219.zip gcc-0ffbef9f3553b6f9841f01ac5ff61850af63b219.tar.gz gcc-0ffbef9f3553b6f9841f01ac5ff61850af63b219.tar.bz2 |
[Ada] Spurious warning on uninitialized entity during code generation
This patch suppresses a spurious warning coming from the GCC backend, on
an aggregate that cannot be built in place and for which a temporary
variable must be created. If the type of the aggregate is a packed
boolean array, the generated code may appear to use an uninitialized
value for a component of the array, when in fact the code simply sets a
single bit of that array.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_aggr.adb (Expand_Array_Aggregate): If it is not possible
to build in place an aggregate with component associations, set
the Warnings_Off flag on the generated temporary, to prevent
spurious warnings from the backend when compiling with the
-Wuninitialized gcc flag.
gcc/testsuite/
* gnat.dg/warn18.adb: New testcase.
From-SVN: r264960
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions