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]

Re: PATCH: PR c/36892: Support __attribute__((deprecated("text string")))


On Fri, May 8, 2009 at 7:17 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 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:

Our patch doesn't change the format.

> 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);
>

That is independent of our changes.

-- 
H.J.


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