This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9189: [3.4 regression] [New parser] Order of default argument processing and function body compilation
- From: bangerth at dealii dot org
- To: Theodore dot Papadopoulo at sophia dot inria dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mark at codesourcery dot com, nobody at gcc dot gnu dot org
- Date: 6 Jan 2003 15:49:00 -0000
- Subject: Re: c++/9189: [3.4 regression] [New parser] Order of default argument processing and function body compilation
- Reply-to: bangerth at dealii dot org, Theodore dot Papadopoulo at sophia dot inria dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mark at codesourcery dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Old Synopsis: New parser problem
New Synopsis: [3.4 regression] [New parser] Order of default argument processing and function body compilation
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Jan 6 07:47:42 2003
State-Changed-Why:
Confirmed. A shorter testcase is
-----------------
struct A {
enum { value = 10 };
A() { f(); }
static int f(int i=value);
};
-------------------
with this message:
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -o /dev/null -c test6.C
test6.C: In constructor `A::A()':
test6.C:3: error: the default argument for parameter 0 of `static int A::f(int)
' has not yet been parsed
I think the body of the constructor should only be compiled
_after_ the parsing of the member declarations is done, but
then I don't know this exactly.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9189