This is the mail archive of the gcc@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: [C++] Deprecating default arguments on function types


On 21 Jul 2003 15:20:24 +0200, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:

> Nathan Sidwell <nathan@codesourcery.com> writes:
>
> | Can we deprecate
> | 	typedef int (*P) (int = 1);
> | 	int f (P p) { return p ();}
> | ?
>
> Mark already deprecated something like
>
>    int f(int, int = 0);
>
>    int(*p)(int) = &f;

I don't think we ever supported code like that; it would require some sort
of thunk.

WRT Nathan's question, I still think that it makes sense to have default
args on, say, function pointers, but it certainly doesn't seem to have
caught the imagination of the C++ community, so it's probably not worth
retaining as an extension.  I think one of our customers still uses this
extension, but I've never heard of anyone else doing so (and they're stuck
on a 1998-era compiler for other reasons).

Jason


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