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]

Possible RTTI bug


I'm working with egcs-1.1.1 on Linux 2.2.1, and I have a problem with RTTI.
This is an example:

[boss in ~/work/C++]$ cat RTTI-example.cc 
#include <iostream.h>

int main (int argc, char *argv[]) {
  char str[10];
  float f;
  cout << typeid(str).name() << " " << typeid(f).name () << endl;
  return 0;
}

[boss in ~/work/C++]$ g++ -fno-rtti -v -Wall RTTI-example.cc
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.60/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -Wall -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ RTTI-example.cc /tmp/ccleHmIk.ii
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/i586-pc-linux-gnu/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.60/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.60/cc1plus /tmp/ccleHmIk.ii -quiet -dumpbase RTTI-example.cc -Wall -version -fno-rtti -o /tmp/cck0blmy.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i586-pc-linux-gnu) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
RTTI-example.cc: In function `int main(int, char **)':
RTTI-example.cc:10: Internal compiler error.
RTTI-example.cc:10: Please submit a full bug report to `egcs-bugs@cygnus.com'.
RTTI-example.cc:10: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details
[boss in ~/work/C++]$ 

Is this a bug ? But I read `gcc/cp/NEWS' file of egcs distribution, it contains
the next information:

* RTTI support has been rewritten to work properly and is now on by default.
  This means code that uses virtual functions will have a modest space
  overhead.  You can use the -fno-rtti flag to disable RTTI support.

And where can I find the information about RTTI in egcs ? I can't find
it neither in manual pages and info entries distributed with egcs, nor
on your site <egcs.cygnus.com> - why ? And what is about conformance of egcs 
RTTI mechanisms with C++ standard(s) ?

                        With regards, Dmitry A. Antipov <antipov@msiu.ru>.
                        Sorry for bad english (I'm not a native).


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