This is the mail archive of the 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: Deprecate g++ overloading extension?

Jason Merrill wrote:

On Fri, 2 Jul 2004 10:13:58 -0700, Mark Mitchell <> wrote:

We have an undocumented extension to overload resolution in "joust".
Unless we're being pedantic, we make a try at resolving ambiguities by
choosing the function whose worst conversion is least bad.

I haven't seen any sign that the committee is considering extending
the overload rules in this way, and since this is totally
undocumented, people using this alleged feature are presumably doing
so purely by accident.

What do you think about removing this extension from non-pedantic

I'm opposed to removing it. We already give an unconditional pedwarn which tells the user what's wrong with their code.

Actually, that's not true.

If we pick a built-in candidate, we don't warn -- because we never go through the call machinery which is where the warning would be generated.

That's why this came up; I talked to someone who was confused by the fact that G++ did not match another compiler's behavior.

Will you agree to implement a fix for the case where we pick a built-in candidate?

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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