This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory


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.

So it might be something to consider to allow for -fpermissive as a lot
of code may be affected if we change behavior on this.

Richard.


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