Mail Archives: djgpp/1998/03/15/08:31:33
In comp.os.msdos.djgpp Robert Hoehne <robert DOT hoehne AT gmx DOT net> wrote:
> telford AT xenon DOT triode DOT net DOT au wrote :
> >
> >
> > Well anyone know how to clobber this compiler feature?
> If you want to mix object files which where produced with
> gcc 2.8.x and gcc 2.7.x then you should know, that in gcc 2.8.x
> exception handling and runtime type identification are enabled
> by default (the typinfo nodes are used by rtti). To use the
> gcc 2.8.x produced object files also with gcc 2.7.x you should
> use _EVER_ the flags
> -fno-exceptions -fno-rtti
I'd noticed that the exceptions were on by default and I managed to
sus out -fno-exceptions, they don't seem to effect the linking though,
they just make bigger code. The -fno-rtti is new to me and (just like
you said) it switched off all of the type_info. Cool bananas, my cross
compiler is looking better all the time. I've been through the gcc 2.8.0
info pages and a grep on `rtti' though all the info pages that I have
doesn't come back with anything. Still, however you found it, thanks!
Come to think of it, -fno-exceptions and -fno-rtti is probably a good
standard for my Linux work too since exception handling is very size
expensive and the type_info stuff is something I'm unlikely to use
(it could be good for a linked list of various types and you want to
know what you have pulled off the list).
- Tel
- Raw text -