d: Add -Wvarargs warning flag to the D front-end
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 16 Jul 2020 16:56:18 +0000 (18:56 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 30 Jul 2020 21:44:31 +0000 (23:44 +0200)
commit873b45d39c14fee6b68032b83ea6bfbc023e3379
tree289a1fe87fe637c99fb0211dc554638663754220
parentdfc420f8d4492dbf5f45df4fecf93cb9645c0d7b
d: Add -Wvarargs warning flag to the D front-end

The D front-end has C-style variadic functions and va_start/va_arg, so
it is right to also have warnings for inproper use.

gcc/d/ChangeLog:

PR d/96154
* gdc.texi (Warnings): Document -Wvarargs.
* lang.opt: Add -Wvarargs

gcc/testsuite/ChangeLog:

PR d/96154
* gdc.dg/pr96154a.d: New test.
* gdc.dg/pr96154b.d: New test.
gcc/d/gdc.texi
gcc/d/lang.opt
gcc/testsuite/gdc.dg/pr96154a.d [new file with mode: 0644]
gcc/testsuite/gdc.dg/pr96154b.d [new file with mode: 0644]