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
On Sat, 9 Dec 2006, Richard Guenther wrote:
| On 08 Dec 2006 19:39:35 -0600, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
| > 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();
|
| doh! Ok, then libstdc++ is broken as well, as is Boost if I remember
| correctly.
libstdc++ should be fixed (this would not be the first time :-) -- and
I'm sure Boost too.
-- Gaby