This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
Richard Guenther <rguenther@suse.de> writes:
[...]
| > I think it would be best if we could track this down, because that might
| > allow us to really completely nail this problem.
|
| Ok, here's one testcase that fails
|
| template <class _Tp> class auto_ptr {};
| template <class _Tp>
| class counted_ptr
| {
| public:
| auto_ptr<_Tp> auto_ptr();
| };
|
| with
|
| t.ii:6: error: declaration of 'auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()'
| t.ii:1: error: changes meaning of 'auto_ptr' from 'class auto_ptr<_Tp>'
That means GCC is functionning correctly -- for once, GCC hasn't
screwed up its data structures :-)
I believe the program is invalid. It should have been
::auto_ptr<_Tp> auto_ptr();
-- Gaby