[PATCH] Fix -Wdisallowed-function-list=* (PR c++/39554)

Mark Mitchell mark@codesourcery.com
Wed Mar 25 23:38:00 GMT 2009


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



More information about the Gcc-patches mailing list