[Bug c++/84076] [6/7/8 Regression] Warning about objects through POD mistakenly claims the object is a pointer
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 9 20:39:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84076
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Mar 9 20:39:14 2018
New Revision: 258397
URL: https://gcc.gnu.org/viewcvs?rev=258397&root=gcc&view=rev
Log:
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:
trunk/gcc/testsuite/g++.dg/warn/Wformat-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list