re PR c++/84076 (Warning about objects through POD mistakenly claims the object is...
authorJason Merrill <jason@redhat.com>
Fri, 9 Mar 2018 20:39:14 +0000 (21:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 9 Mar 2018 20:39:14 +0000 (21:39 +0100)
commit5f2440b05799cb854b8d4a7622d50d7abcfecb0f
tree07f5ca17c8a0e16251dc95db53e4faea704e967a
parent9d9a9a90ce25d3b2748df78e4ae05e0c74d0b671
re PR c++/84076 (Warning about objects through POD mistakenly claims the object is a pointer)

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.

From-SVN: r258397
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wformat-2.C [new file with mode: 0644]