From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Artem Khodush" To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/3309: 'string' typedef bug Date: Thu, 21 Jun 2001 01:56:00 -0000 Message-id: <20010621085600.19068.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00880.html List-Id: The following reply was made to PR c++/3309; it has been noted by GNATS. From: "Artem Khodush" To: Cc: , Subject: Re: c++/3309: 'string' typedef bug Date: Thu, 21 Jun 2001 12:39:02 +0400 > #include > > > class Test > { > public: > > typedef int IntType; > typedef string StringType; > }; > >test.cxx:11: ISO C++ forbids declaration of `string' with no type >test.cxx:11: parse error before `;' token This is not a bug, though the error message is somewhat misleading. Gcc 3.0 is much closer to c++ standard then 2.95, so header does not define class string in the global namespace anymore. Either write typedef std::string StringType; or using std::string; // just after including