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] Fix PR c++/17729 double deprecated warning


Andrew Pinski wrote:
We were warning twice for deprecated on a function if we call the function.
The way to fix this is not to warn when we are building the call as we have
already warned about the decl after figuring out what the decl is.

OK for 3.4 and the mainline.

Can you prove that with your patch we will not fail to issue a deprecated warning in some other situation? There are a lot of ways to get to build_call.


To fix this kind of defect, you need to write documentation explaining whose responsibility it is to issue the warning. It should be clear that all deprecated functions will be caught by one of the chokepoints listed in your documentation. Then, make sure that the chokepoints all contain code to issue the warning, writing test cases, ideally. Then remove the code to issue warnings that is not in the checkpoints.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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