This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR c/36892: Support __attribute__((deprecated("text string")))
2009/5/8 H.J. Lu <hjl.tools@gmail.com>:
> - ? ? ?warning (OPT_Wdeprecated_declarations,
> - ? ? ? ? ? ? ?"%qD is deprecated (declared at %s:%d)",
> - ? ? ? ? ? ? ?node, xloc.file, xloc.line);
Why these warnings report the declaration location different than
other warnings? In other cases we print:
warning: something wrong with this
note: this was declared here
which I guess allows IDEs to jump to the declaration location.
The latter can be implemented with:
warning_at (OPT_Wdeprecated_declarations, "%qD is deprecated", node)
&& inform (DECL_SOURCE_LOCATION (decl), "%qD declared here", node);
Cheers,
Manuel.