]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/ChangeLog
[Ada] Avoid spurious warning on wrong order of operator call arguments
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jul 2019 08:01:07 +0000 (08:01 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jul 2019 08:01:07 +0000 (08:01 +0000)
commitd7569e0494cc7b409691478e01b3979fd992e29b
treed677009c2a8e3e15f1b14e9db02eed648b6cd4fe
parent92796fc82dc53d6bc591a06fc3efed548c462316
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273378 138bc75d-0d04-0410-961f-82ee72b054a4
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]