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 Mon, 2003-07-21 at 10:35, Gabriel Dos Reis wrote:
> Jason Merrill <jason@redhat.com> writes:
> 
> | 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.
> 
> I finally got the reference and my memory indeed failed.  The example
> of construct Mark wanted to remove is
> 
>   void f(int);
> 
>   void g() {
>     typedef void (*P)(int = 3);
>     P p = f;
>     (*p)();
>   }
> 
> from
> 
>    http://gcc.gnu.org/ml/gcc/2002-07/msg00509.html

That's basically the same extension that Nathan wants to remove.

So, I think that we've all reached consensus, and this extension (in its
various forms) can go away.

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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