This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 34758
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 20 Jan 2008 22:13:01 +0100
- Subject: Re: [C++ Patch] PR 34758
- References: <478FD2ED.4060906@suse.de> <47939FA4.7050106@codesourcery.com>
Hi again,
I'm trying to better understand this issue...
> In particular, if the default argument tried to invoke a method with
> default arguments declared later in the class, I think we would have
> trouble too:
>
> struct S {
> S(const S& = f());
> static const S& f(int i = 3);
> };
>
> So, I'm not actually sure what's wrong with the current message. I
> think it explains the problem reasonably well.
>
Note that in this case we have, currently:
t.C:2: error: the default argument for parameter 0 of ‘static const S&
S::f(int)’ has not yet been parsed
vs
t.C:2: error: circular dependency in default argument of ‘static const
S& S::f(int)’
That is, the current message seems really weird, I would say wrong...
Paolo.