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)
On Fri, Mar 27, 2009 at 06:37:34PM -0700, Ian Lance Taylor wrote:
> > What do you think about the design issue, though? Independent of the
> > need for the feature, I think we should come up with a way of doing this
> > that allows for overloading. Unless we have a story about how adding
> > that will be compatible with what we have (rather than introducing a
> > separate mechanism), I think we should defer this functionality.
>
> I don't think it's very interesting to disallow one version of an
> overloaded function while permitting other versions.
It is not just about overloads, but about namespaces as well.
While you might want to disallow std::swap, com::foobar::utils::swap
might be still acceptable, and both have the same DECL_NAME.
We already have warning and error attribute, perhaps those fit in
(though not 100% sure how they play well with builtins that are folded
already at tree opt level).
Or if error/warning doesn't work, I'm fine with unavailable attribute
(and for both deprecated and this attribute there should be an optional
text argument, a message to print to the user, didn't H.J. had such a patch
queued for 4.5?).
Jakub