This is the mail archive of the gcc-patches@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: PR c++/34758 Bad diagnostic for circular dependency in constructor default argument


2009/2/13 Mark Mitchell <mark@codesourcery.com>:
> Manuel López-Ibáñez wrote:
>> 2009/2/12 Mark Mitchell <mark@codesourcery.com>:
>>> What's parmnum?  The parameter of the function being declared right now?
>>>  Or the parameter in the callee that has a default value that has not
>>> yet been processed?
>>
>> fn is the function being called that has not yet been declared.
>> In the call to fn, parmnum is the parameter using a default value.
>
> OK, then how about:
>
>  "cannot use default argument for parameter %P prior to declaration of %qD"
>

That is clearer, but in the circular case A (const A& = A())  it is
still not clear that the problem is the call to A().

What about

default argument for parameter %P cannot be used in call to %qD prior
to its declaration.

I will really appreciate the input of those that got confused by this
in the first place. They are the ones that should be satisfied with
whatever is the final message.

Cheers,

Manuel.


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