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]

c++/2108: parse error on legal code.



>Number:         2108
>Category:       c++
>Synopsis:       parse error on legal code.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 26 15:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jamie Painter
>Release:        gcc version 2.95.2 19991024 (release)  also code sourcery 3.0 snapshot 20010226
>Organization:
>Environment:
i586-pc-linux
>Description:
The following code gets a parse error at the "." token.

struct c1 { c1(int); };
struct c2 { 
  c2();  
  int method() const;
};

void tst()
{
  c1( c2().method() );
}
>How-To-Repeat:
g++ -c tst.cpp
>Fix:

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


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