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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The convert_arg_to_ellipsis call that converts in this case the non-POD class
to its address is done very shortly before calling the -Wformat check, but most
of the stuff the function is doing is needed for the following
check_format_arguments.  So, in order to hide this in diagnostics, we'd either
need to somehow mark the tree with the argument that check_format_arguments
could determine it is implicitly added, or have another on the side array with
the argument types for -Wformat* etc.
The question is though if we want or don't want to warn for
std::string str;
printf ("%p\n", str);
where str is passed as reference and thus printing address of it would work
just fine.

Reply via email to