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]

[PATCH] Fix PR c++/17729 double deprecated warning


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.

The testcase which I have no idea on how to get it into a testsuite form
as dejagnu will eat both warnings as one:
void func(void) __attribute__((deprecated));
void f(void) {
  func();
}

Thanks,
Andrew Pinski

ChangeLog:

	* call.c (build_call): Do not call warn_deprecated_use as we have
	already warned about it by the time we get here.

Attachment: temp.diff.txt
Description: Text document


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