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]

[C++] Deprecating default arguments on function types


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



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