diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-05-24 13:05:49 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-24 13:05:49 +0000 |
commit | 861e589e8b957713fb02b5db0773c39bed2dcc61 (patch) | |
tree | c70a303f0872fe365859f4ad242d0978dd905b84 /gcc/ada/ChangeLog | |
parent | 0347c01b136f864830d1ec9e8d9f1da0cb8029f7 (diff) | |
download | gcc-861e589e8b957713fb02b5db0773c39bed2dcc61.zip gcc-861e589e8b957713fb02b5db0773c39bed2dcc61.tar.gz gcc-861e589e8b957713fb02b5db0773c39bed2dcc61.tar.bz2 |
[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.
From-SVN: r260657
Diffstat (limited to 'gcc/ada/ChangeLog')
-rw-r--r-- | gcc/ada/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b30baad..2e80976 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-05-24 Ed Schonberg <schonberg@adacore.com> + + * 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. + 2018-05-24 Raphael Amiard <amiard@adacore.com> * libgnat/a-cohama.ads: Add documentation. |