This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR 17947 bad warning with implicit conversion and __attribute__((deprecated))


:ADDPATCH toplev / c++:

The Wdeprecated-declarations warning is using %qs to print the name of
a declaration. This produces funny results such as "operator 1" when
it should say "Foo::operator int()". This patch replaces %qs with %qD
and updates current testcases. I wasn't able to find what is the
difference between %qD, %q+D and %q#D, so I am not sure if this is the
right choice.

Bootstrapped and regression tested with --enable-languages=all on
i686-pc-linux-gnu.

OK for mainline?

2007-01-18  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 PR c++/17947
 * toplev.c (warn_deprecated_use): Use %qD instead of %qs to print
the name of the declared identifier.

testsuite/
 PR c++/17947
 * g++.dg/warn/deprecated.C: Update warning output.
 * g++.dg/warn/deprecated-2.C: Likewise.
 * g++.dg/warn/deprecated-3.C: New.

Attachment: wdeprecated.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]