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 c++] (__attribute__((deprecated)), part a) Fix PR17729



On 8 Jun 2010, at 23:50, Jason Merrill wrote:


On 04/17/2010 07:16 AM, IainS wrote:
PR c++/17729
* typeck.c(build_class_member_access_expr): Don't check for deprecation
here.

I believe this will cause false negatives on template code.


* call.c(build_call_a): Ditto.
(build_over_call): Ditto.
(convert_like_real): Check for deprecation here instead.
(build_new_method_call): Ditto.

And these cause false negatives on overloaded functions. We really need to handle functions in build_call_a and build_over_call, since that's when we know which function we're actually calling in the case of function overloading.

the question then, is how to prevent the duplicates, since those places are called from more than one part of the process (or, at least, they were when I last looked).


In the testcase, if you add a non-deprecated func(int), you get no warning about calling the deprecated func(void). The testcase also doesn't test member functions at all.

OK. I wasn't amazingly happy that this had all bases covered.
I expanded the test-cases a little - but they are mostly based on what's already in the test-suite.


----

Actually, I intended to get back to this in the next few weeks - since __attribute__((unavailable)) is a prerequisite of ObjC V1.

Before I put this to one side, I had improved the diagnosis of deprecated function arguments - and also harmonized the behavior of function deprecation messages between C and C++.

I am sure all those patches will have severe bit-rot now - but I'll try and resurrect them soon.

Sorry for the slow review; please feel free to ping me directly on C+ + patches.

thanks, I'm going slowly here anyway, Iain



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