https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84076

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Jun 22 20:34:33 2018
New Revision: 261917

URL: https://gcc.gnu.org/viewcvs?rev=261917&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-7-branch/gcc/testsuite/g++.dg/warn/Wformat-2.C
Modified:
    branches/gcc-7-branch/gcc/cp/ChangeLog
    branches/gcc-7-branch/gcc/cp/call.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog

Reply via email to