c++/9272: New parser: Cannot declare friend a constructor with arguments?
bagnara@cs.unipr.it
bagnara@cs.unipr.it
Mon Jan 13 05:17:00 GMT 2003
>Number: 9272
>Category: c++
>Synopsis: New parser: Cannot declare friend a constructor with arguments?
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 10 23:16:02 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: bagnara@cs.unipr.it
>Release: 3.4 20030110 (experimental)
>Organization:
>Environment:
Linux zoltan.unisuv.it 2.4.20 #33 Sun Dec 1 21:23:01 CET 2002 i686 athlon i386 GNU/Linux
>Description:
Compiling the snippet
class L;
class R;
class L {
public:
L();
L(int);
};
class R {
friend L::L();
friend L::L(int); // What's wrong with this?
};
with the CVS head version of January 10, 2003, gives
$ /spare/bin/g++ -W -Wall -c bug.cc
bug.cc:12: error: expected unqualified-id
bug.cc:12: error: expected `)'
$ /spare/bin/g++ -v
Reading specs from /spare/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/spare
Thread model: posix
gcc version 3.4 20030110 (experimental)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list