public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Karl Kobata" <karl.kobata@syncira.com>
To: <gcc-help@gcc.gnu.org>
Subject: compile error on template using gcc 3.4.4 that worked for gcc 3.3.x
Date: Wed, 09 May 2007 03:22:00 -0000	[thread overview]
Message-ID: <5p5kll$fhd0n@rrcs-agw-02.hrndva.rr.com> (raw)


Can anyone help?  Can anyone suggest source code change?

Thanks
karl

________________________________________
From: Karl Kobata [mailto:karl.kobata@syncira.com] 
Sent: Sunday, May 06, 2007 10:45 PM
To: 'gcc-help@gcc.gnu.org'
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)

========= 

             reply	other threads:[~2007-05-09  3:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  3:22 Karl Kobata [this message]
2007-05-09 23:59 ` Ian Lance Taylor
2007-05-11 22:03   ` Karl Kobata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='5p5kll$fhd0n@rrcs-agw-02.hrndva.rr.com' \
    --to=karl.kobata@syncira.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).