c++/2121: Parse error

bourguet@cadence.com bourguet@cadence.com
Wed Feb 28 02:06:00 GMT 2001


>Number:         2121
>Category:       c++
>Synopsis:       Parse error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 28 02:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     bourguet@cadence.com
>Release:        2.7.2.2, 2.8.1, 2.95.2, today code sourcery online test drive
>Organization:
>Environment:

>Description:
class foo;

class bar {
public:
  bar(foo*, int i);
};

foo* f() {
  return 0;
}

void g() {
  bar(f(), 6);
}

Fail to compile with a parse error on the "," in g().

>From my reading of the standard, and according to every
other compilers I've tested the code on (Comeau online test
drive, sparc works 5.0, HP aCC B3910B A.01.15, HP aCC B3910B A.03.27 with
and without -AA, IBM xlC unknown verion) accepted it.

-- Jean-Marc
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list