aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/socket.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-08-19 08:36:17 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-19 08:36:17 +0000
commit4527ea2ed93d705b05a01a63561839748655505c (patch)
treee92044a4a16697a30563c5db57d5082d4a1acf2d /gcc/ada/socket.c
parentdafa2ae46c9f0d95821fd365e8c554008b934819 (diff)
downloadgcc-4527ea2ed93d705b05a01a63561839748655505c.zip
gcc-4527ea2ed93d705b05a01a63561839748655505c.tar.gz
gcc-4527ea2ed93d705b05a01a63561839748655505c.tar.bz2
[Ada] Improve placement of warning on formals of generic subprograms
This patch modifies the handling of warnings on unused formal parameters of generic subprograms. Previously such warnings were placed on the formal appearing in the subprogram declaration, in contrast with warnings on non-generic subprograms, where the warning is placed on the corresponding entity in the body of the subprogram. This patch makes the handling of both cases uniform. It is preferable to place the warning in the body because this also provides a better suggestion for the placement of an Unreferenced pragma to suppress the warning when desired. 2019-08-19 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_warn.adb (Check_References, Generic_Body_Formal): When a formal parameter of a generic subprogram is not referenced in the body, place the corresponding warning on the corresponding entity in the specification of the generic body, as is done for non-generic subprograms. gcc/testsuite/ * gnat.dg/warn28.adb, gnat.dg/warn28.ads: New testcase. From-SVN: r274649
Diffstat (limited to 'gcc/ada/socket.c')
0 files changed, 0 insertions, 0 deletions