This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r260657 - in /trunk/gcc: ada/ChangeLog ada/exp_...
- From: pmderodat at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 24 May 2018 13:05:49 -0000
- Subject: r260657 - in /trunk/gcc: ada/ChangeLog ada/exp_...
Author: pmderodat
Date: Thu May 24 13:05:49 2018
New Revision: 260657
URL: https://gcc.gnu.org/viewcvs?rev=260657&root=gcc&view=rev
Log:
[Ada] Add warning on redundant others_clause in array aggregate
This patch adds a warning on a redundant others_clause in an array aggregate
when all index positions are already specified in previous positional or named
associations. The warning is emitted when Warn_On_Redundant_Constructs is
enabled.
2018-05-24 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_aggr.adb (Flatten): Add a warning on an others clause in an array
aggregate with static bounds when named associations cover all index
positions and the others clause is redundant.
gcc/testsuite/
* gnat.dg/others1.adb: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/others1.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_aggr.adb
trunk/gcc/testsuite/ChangeLog