egcs gives internal compiler error

Mark Mitchell mark@codesourcery.com
Sat Jul 31 23:33:00 GMT 1999


Erik --

  Thanks for your bug report.  I've committed the following simplified
version to the test-suite.

  template <class T>
  struct S 
  {
    template <class U>
    friend S<U>;
  };

  template struct S<int>;

The `friend S<U>' (in your case, this is `Ptr<D>') is non-standard.
You should use `friend struct S'.  If you say `friend struct S<U>',
g++ will issue an error message (appropriately), but with `friend
S<U>', it does not.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com



More information about the Gcc-bugs mailing list