r260657 - in /trunk/gcc: ada/ChangeLog ada/exp_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Thu May 24 13:05:00 GMT 2018


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



More information about the Gcc-cvs mailing list