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


Manuel López-Ibáñez wrote:

>>  "cannot use default argument for parameter %P prior to declaration of %qD"

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

The problem with that phrase is that it's not clear to what "its"
refers.  The function named with %qD?  Or the parameter given by %P?

(Another unfortunate aspect is that we're referring to parameter N,
instead of the parameter by name.  In general, we don't have a name,
because the parameter is anonymous, or because we're calling through a
function pointer -- but in the common case we do.  But, that's an
orthogonal issue to the one you're trying to solve.)

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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