From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Wu To: gcc-gnats@gcc.gnu.org Subject: c++/3309: 'string' typedef bug Date: Wed, 20 Jun 2001 18:36:00 -0000 Message-id: <200106210129.SAA04690@pc.georgewu.com> X-SW-Source: 2001-06/msg00870.html List-Id: >Number: 3309 >Category: c++ >Synopsis: Incorrect compilation error. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Jun 20 18:36:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: George Wu >Release: 3.0 >Organization: >Environment: System: Linux pc 2.2.17 #5 Fri Oct 27 23:29:32 PDT 2000 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../configure --prefix=/usr/local/gcc-3.0 --enable-threads >Description: #include class Test { public: typedef int IntType; typedef string StringType; }; Compiling the above test program generates the following incorrect error: test.cxx:11: ISO C++ forbids declaration of `string' with no type test.cxx:11: parse error before `;' token The same code works under gcc 2.95.x. >How-To-Repeat: Type "g++ .cxx". >Fix: Unknown. >Release-Note: >Audit-Trail: >Unformatted: