This is the mail archive of the gcc@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]

Re: Bug found in STL?


[Please report bugs to gcc-bugs not gcc.  Better yet, use the GNATS
 interface at http://gcc.gnu.org]

> I'm fairly sure this is legal C++ code.  Try compiling this source with
> gcc-2.95.3 and have a look at the errors.  Is this a bug?

Thank you for the bug report.  I see nothing that makes me think the
code is illegal (with a minor namespace issue resolved that was not
strictly enforced in gcc 2.95.3).  I have no idea if anyone is
actively working on fixing bugs with 2.95.3.

This code works fine with prerelease 3.0 (I only added the ``using
namespace std;'' but the other obvious variation of adding std:: to
list<bar*> works as well):

#include <list>

namespace foo
{
  typedef void (*destroy) (void* ptr);

  class bar
  {
  public:
    bar();
  };
}

using namespace foo;
using namespace std;

list<bar*> lb;


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