From mboxrd@z Thu Jan 1 00:00:00 1970 From: mps@sonartech.com.au To: gcc-gnats@gcc.gnu.org Subject: c++/3021: Missing attachment from report c++/3020 Date: Thu, 31 May 2001 21:56:00 -0000 Message-id: <20010601044902.30755.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg01076.html List-Id: >Number: 3021 >Category: c++ >Synopsis: Missing attachment from report c++/3020 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu May 31 21:56:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Michael Shepanski >Release: gcc version 2.95.2 19991024 (release) >Organization: >Environment: Linux/Pentium >Description: Oops -- didn't succeed in attaching the program text to bug report c++/3020. Here it is. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="tmp.cpp" Content-Disposition: inline; filename="tmp.cpp" #include class A { public: int x; }; class B { public: A *a; A * operator-> () { return a; } int f () { return this->operator->()->x; } // ok int g () { return this->x; } // rejected }; int main () { B b; printf ("%d", b -> x); // ok }