This is the mail archive of the gcc-bugs@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: c++/9189: [3.4 regression] [New parser] Order of default argument processing and function body compilation


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


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