This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[C++] Deprecating default arguments on function types
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Jason Merrill <jason at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 21 Jul 2003 14:08:19 +0100
- Subject: [C++] Deprecating default arguments on function types
- Organization: Codesourcery LLC
Can we deprecate
typedef int (*P) (int = 1);
int f (P p) { return p ();}
?
3.4 only allows it (with pedwarn) when -fpermissive is in effect.
I'd like to deprecate it entirely. (deprecate in 3.4, remove in 3.5)
Rationale: Other than not being C++, I have a protopatch which improves
the speed of type comparisons. However, getting that into a sensible shape
within the current type handling machinery would be assisted (though not
impossible without change) by putting default argument expressions on
DECL_INITIAL of a function's PARM_DECLs.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk