This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++ test
- To: Eric Christopher <echristo at cygnus dot com>
- Subject: Re: c++ test
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 10 Nov 2000 16:46:29 -0200
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <3A0B3CDF.C944EF12@cygnus.com>
On Nov 9, 2000, Eric Christopher <echristo@cygnus.com> wrote:
> test.cc:17: invalid use of type decl `struct DATA' as expression
> test.cc:17: parse error before ':' token
This is indeed wrong.
> test.cc: In function `int main ()':
> test.cc:17: passing `const DATA' as `this' argument of `DATA::~DATA ()'
> discards qualifiers
But this error message looks right to me, unless there's some rule I
don't remember that allows a destructor to be *explicitly* called on a
const object (it can certainly be called *implicitly*).
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me