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 -Wdisallowed-function-list=* (PR c++/39554)


Jakub Jelinek wrote:

> 2009-03-25  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/39554
> 	* opts.c (warn_if_disallowed_function_p): Don't assume
> 	get_callee_fndecl must return non-NULL.
> 
> 	* gcc.dg/wdisallowed-functions-3.c: New test.
> 	* g++.dg/warn/Wdisallowed-functions-3.C: New test.

OK.

> +      fnname = IDENTIFIER_POINTER (DECL_NAME (fndecl));
>        for (i = 0; VEC_iterate (char_p, warning_disallowed_functions, i, s);
>             ++i)

Ugh.  This seems somewhat broken-by-design for C++ (and such) where
function names are almost never what you want, given that there are in
general lots of functions with the same DECL_NAME.  But, that ship has
sailed...

Thanks,

-- 
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]