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 Mon, 11 Dec 2006, Gabriel Dos Reis wrote:
> Michael Matz <matz@suse.de> writes:
>
> | Hi,
> |
> | On Sun, 9 Dec 2006, Gabriel Dos Reis wrote:
> |
> | > | More importantly, we know that this code is in our testsuite, in
> | > | libstdc++, and accepted by EDG -- all of which suggests that this
> | > | construct is likely in relatively widespread use. I'm not sure that
> | > | it's a good tradeoff to break that code for the sake of a diagnostic
> | > | which is explicitly not required by the standard.
> | >
> | > And the code is explicitly invalid. And we already reject the code,
> |
> | We don't currently, that's exactly the point of this thread.
>
> % g++ -v && cat mm.C && g++ mm.C
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: /home/gdr/redhat/trunk.gcc/configure
> --prefix=/home/gdr --enable-languages=c++
> Thread model: posix
> gcc version 4.3.0 20061109 (experimental)
> struct T { };
> struct S {
> T T();
> };
> mm.C:3: error: declaration of 'T S::T()'
> mm.C:1: error: changes meaning of 'T' from 'struct T'
The testcase where behavior is changed with the patch is
template <class _Tp> class auto_ptr {};
template <class _Tp>
class counted_ptr
{
public:
auto_ptr<_Tp> auto_ptr();
};
when there are templates involved. We currently accept this but
will reject it with the patch.
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
- References:
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory
- Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory