This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] Deprecating default arguments on function types
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
There does not seem to be a follow up to that message however.
-- Gaby