[Ada] Add warning on redundant others_clause in array aggregate
Pierre-Marie de Rodat
derodat@adacore.com
Thu May 24 13:08:00 GMT 2018
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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 970 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180524/66876404/attachment.bin>
More information about the Gcc-patches
mailing list