Can anyone help? Can anyone suggest source code change? Thanks karl ________________________________________ From: Karl Kobata [mailto:karl.kobata@xxxxxxxxxxx] Sent: Sunday, May 06, 2007 10:45 PM To: 'gcc-help@xxxxxxxxxxx' Subject: compile error on template using gcc 3.4.4 Can anyone help me. I am getting the error messages below for the source snippet included. On the previous version of gcc, this error did not occur. What defaults were assumed on the previous version of the compiler? Please help. Please suggest source changes. Thanks karl ============== source that is erroring =============== 36 template<class T> class OutputBuffer : public Buffer<T> { 37 public: 38 virtual int Flush() = 0; 39 virtual int Put(const T& t) { *pt++ = t; return pt >= end ? Flush() : 0; } 40 OutputBuffer(unsigned int sz):Buffer<T>(sz) { pt = base; } 41 OutputBuffer(T* b, unsigned int sz):Buffer<T>(b, sz) { pt = base; } 42 OutputBuffer() { pt = base; } 43 ~OutputBuffer() {} 44 }; ========== error messages using gcc 3.4.4 ================= /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:39: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:39: error: `end' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `OutputBuffer<T>::OutputBuffer(unsigned int)': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:40: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:40: error: `base' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `OutputBuffer<T>::OutputBuffer(T*, unsigned int)': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:41: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:41: error: `base' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `OutputBuffer<T>::OutputBuffer()': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:42: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:42: error: `base' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In member function `virtual int InputBuffer<T>::Get(T&)': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:51: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:51: error: `end' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `InputBuffer<T>::InputBuffer(unsigned int)': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:53: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:53: error: `end' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `InputBuffer<T>::InputBuffer(T*, unsigned int)': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:54: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:54: error: `end' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h: In constructor `InputBuffer<T>::InputBuffer()': /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:55: error: `pt' undeclared (first use this function) /home/AppsTest/MGen/MgenLibrary/aeg/include/generic/buffer.h:55: error: `end' undeclared (first use this function) =========