This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9162
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 31 Jan 2003 20:56:01 -0000
- Subject: Re: c++/9162
- Reply-to: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
The following reply was made to PR c++/9162; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc: jbuck@synopsys.com
Subject: Re: c++/9162
Date: Fri, 31 Jan 2003 14:55:01 -0600 (CST)
Here's a smaller testcase for Joe's first case (if fixed, this will
probably also cover the problem with the second one):
---------------------------
struct S {
friend int foo (int = 100);
};
int i = foo ();
---------------------------
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c bug.cpp
bug.cpp:2: error: too few arguments to function `int foo(int = <unparsed>)'
bug.cpp:4: error: at this point in file
Which, of course, leaves the question of when default arguments for
friends will be parsed at all (if not at the point of declaration or first
use, when's the right time?)? -- Aha, at the point of definition as a
simple experiment indicates.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/