This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++ test


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]