[Ada] Avoid spurious warning on wrong order of operator call arguments
authorYannick Moy <moy@adacore.com>
Thu, 11 Jul 2019 08:01:07 +0000 (08:01 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 11 Jul 2019 08:01:07 +0000 (08:01 +0000)
commita34badbdf000e931dfa1a1291cf2739e2c75e68d
treed677009c2a8e3e15f1b14e9db02eed648b6cd4fe
parent435a6d9580fa1675537a4d2a3151802a15064d3d
[Ada] Avoid spurious warning on wrong order of operator call arguments

GNAT issues a warning under -gnatwa when actuals for a call are named
like the formals, but in a different order. This is inappropriate for
calls to operators in infix form, when e.g. Right <= Left is in general
the intended order. Special case calls to operators to avoid that
spurious warning.

2019-07-11  Yannick Moy  <moy@adacore.com>

gcc/ada/

* sem_res.adb (Check_Argument_Order): Special case calls to
operators.

gcc/testsuite/

* gnat.dg/warn21.adb, gnat.dg/warn21.ads: New testcase.

From-SVN: r273378
gcc/ada/ChangeLog
gcc/ada/sem_res.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/warn21.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/warn21.ads [new file with mode: 0644]