This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.4 parser bug?
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Craig Rodrigues <rodrigc at attbi dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 18 Jan 2003 19:29:50 +0100
- Subject: Re: GCC 3.4 parser bug?
- References: <20030118172612.GA10554@attbi.com>
Craig Rodrigues wrote:
Is this ill-formed code, or a parser bug?
Seems to me a parser bug (-> PR!).
Not being a language lawyer, I'm convinced by the evidence
that in the further reduced testcase below the error goes
away (!) if I get rid of the typedef (see commented out code)
Paolo.
/////////
template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr_Rep;
template <class X, class ACE_LOCK>
class ACE_Refcounted_Auto_Ptr
{
public:
virtual ~ACE_Refcounted_Auto_Ptr (void);
protected:
typedef ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> AUTO_REFCOUNTED_PTR_REP;
AUTO_REFCOUNTED_PTR_REP *rep_;
// ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *rep_;
};
template <class X, class ACE_LOCK>
class ACE_Refcounted_Auto_Ptr_Rep
{
private:
friend class ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>;
static void detach (ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *&rep);
ACE_LOCK lock_;
};
template <class X, class ACE_LOCK> inline
ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::~ACE_Refcounted_Auto_Ptr (void)
{
AUTO_REFCOUNTED_PTR_REP::detach (rep_);
// ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::detach (rep_);
}