[aspectc-user] Parse errors

Law, Colin colin.law at epid.eurotherm.co.uk
Wed Feb 6 14:13:37 CET 2002


Thanks for the help with the linux problems, I am now up and running.  I
have found a couple of cases where parse errors are generated, which you may
or may not already know about.  The code

typedef enum x {a,b,c} x;

generates errors.  This was in some existing code I am working with, I am
not sure why it was coded like this, or even whether it is valid c++, but it
does compile with the Microsoft compiler.  I have worked around it.

The second may just be that I am pressing the limits of the compiler, I have
the following:

class CSimpleList
{
public:
	CSimpleList(int nNextOffset = 0);
	void AddHead(void* p);
};

template<class TYPE>
class CTypedSimpleList : public CSimpleList
{
public:
	CTypedSimpleList(int nNextOffset = 0)
		: CSimpleList(nNextOffset) { }
	void AddHead(TYPE p)
		{ CSimpleList::AddHead(p); }
};

This generates an error 
SEMERR: Adding Empty tree node to TemplateDecl

then a Parse error near token `(' on the line declaring AddHead in the
template class;

This one is giving me more problems and a workaround would be appreciated if
at all possible.

Thanks

Colin Law




More information about the aspectc-user mailing list