public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RTTI support is broken ?
@ 1998-04-05 21:29 Ruslan Shevchenko
  0 siblings, 0 replies; only message in thread
From: Ruslan Shevchenko @ 1998-04-05 21:29 UTC (permalink / raw)
  To: egcs

1:
#include ?iostream>
#include ?typeinfo>

using namespace std;

class X
{
public:
 virtual void x(void)  { cout ?? typeid(X).name() ?? endl; }
};

int main(void)
{
  X x;
  x.x();
  return 0;
}
#include ?iostream>
#include ?typeinfo>

using namespace std;

class X
{
public:
 virtual void x(void)  { cout ?? typeid(X).name() ?? endl; }
};

int main(void)
{
  X x;
  x.x();
  return 0;
}


In file included from /usr/local/include/g++/typeinfo:5,
                 from t9.cc:3:
/usr/local/include/g++/std/typeinfo.h:35: declaration of C function
`void * __th
row_type_match_rtti(void *, void *, void *)' conflicts with
?internal>:35: previous declaration `void *
__throw_type_match_rtti(const void *
, const void *, void *)' here
In file included from /usr/local/include/g++/std/typeinfo.h:243,
                 from /usr/local/include/g++/typeinfo:5,
                 from t9.cc:3:
/usr/local/include/g++/stdexcept:40: parse error before `{'
/usr/local/include/g++/stdexcept:44: virtual outside class declaration
/usr/local/include/g++/stdexcept:44: non-member function `what()' cannot
have `c
onst' method qualifier
/usr/local/include/g++/stdexcept: In function `const char * what()':
/usr/local/include/g++/stdexcept:44: `_what' undeclared (first use this
function
)
/usr/local/include/g++/stdexcept:44: (Each undeclared identifier is
reported onl
y once
/usr/local/include/g++/stdexcept:44: for each function it appears in.)
In file included from /usr/local/include/g++/typeinfo:5,
                 from t9.cc:3:
/usr/local/include/g++/std/typeinfo.h:35: declaration of C function
`void * __th
row_type_match_rtti(void *, void *, void *)' conflicts with
?internal>:35: previous declaration `void *
__throw_type_match_rtti(const void *
, const void *, void *)' here
In file included from /usr/local/include/g++/std/typeinfo.h:243,
                 from /usr/local/include/g++/typeinfo:5,
                 from t9.cc:3:
/usr/local/include/g++/stdexcept:40: parse error before `{'
/usr/local/include/g++/stdexcept:44: virtual outside class declaration
/usr/local/include/g++/stdexcept:44: non-member function `what()' cannot
have `c
onst' method qualifier
/usr/local/include/g++/stdexcept: In function `const char * what()':
/usr/local/include/g++/stdexcept:44: `_what' undeclared (first use this
function
)
/usr/local/include/g++/stdexcept:44: (Each undeclared identifier is
reported onl
y once
/usr/local/include/g++/stdexcept:44: for each function it appears in.)




2:
#include ?iostream>
//#include ?typeinfo>

using namespace std;

class X
{
public:
 virtual void x(void)  { cout ?? typeid(X).name() ?? endl; }
};

int main(void)
{
  X x;
  x.x();
  return 0;
}




goblin:$ gcc t9.cc -frtti -lstdc++ 2>?1
t9.cc: In method `void X::x()':
t9.cc:10: no matching function for call to `type_info::name () const'
goblin:$


goblin:$ gcc --version
egcs-2.91.19


--

    @=
     //RSSH                              mailto:Ruslan@Shevchenko.Kiev.UA




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-04-05 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-05 21:29 RTTI support is broken ? Ruslan Shevchenko

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).