https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84076
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon Jun 25 17:30:03 2018 New Revision: 262073 URL: https://gcc.gnu.org/viewcvs?rev=262073&root=gcc&view=rev Log: Backported from mainline 2018-03-09 Jason Merrill <ja...@redhat.com> Jakub Jelinek <ja...@redhat.com> PR c++/84076 * call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr build ADDR_EXPR with REFERENCE_TYPE. (build_over_call): For purposes of check_function_arguments, if argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use its operand rather than the argument itself. * g++.dg/warn/Wformat-2.C: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/warn/Wformat-2.C Modified: branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/call.c branches/gcc-6-branch/gcc/testsuite/ChangeLog