This is the mail archive of the gcc@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: RFC: deprecated functions calling deprecated functions


Eric Christopher wrote:
So, a testcase like this:

extern void foo() __attribute__((deprecated));
extern void bar() __attribute__((deprecated));

void foo() {}

void bar()
{
    foo();
}

Should we warn on the invocation of foo() since it's also being called from within a deprecated function? We are today, but I've gotten a request for that to not warn. This seems reasonable, for example, if you deprecate an entire API or something, but still need to compile the library.

I think we should continue to warn. I can see the arguments on both sides, but I think warning makes sense. The person compiling the library should use -Wno-deprecated, and accept that they be calling some other deprecated function they don't intend to call.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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