This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix -Wdisallowed-function-list=* (PR c++/39554)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Mar 2009 16:34:10 -0700
- Subject: Re: [PATCH] Fix -Wdisallowed-function-list=* (PR c++/39554)
- References: <20090325213133.GF4831@tyan-ft48-01.lab.bos.redhat.com>
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