From: <llewelly@dbritsch.dsl.xmission.com>
To: Neelakanth Nadgir <NEELAKANTH.NADGIR@SUN.COM>
Cc: gcc-help@gcc.gnu.org
Subject: Re: -fno-rtti
Date: Sat, 01 Apr 2000 00:00:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.21.0003131206280.18330-100000@dbritsch.dsl.xmission.com> (raw)
Message-ID: <20000401000000.jPiB7ZAvNWudovxgTC5pLPYpm_n-97P4SirhF3BdqYM@z> (raw)
In-Reply-To: <20000313103358.C25605@neel>
On Mon, 13 Mar 2000, Neelakanth Nadgir wrote:
>
> Hi,
> a quick question,
I believe gcc@gcc.gnu.org is for gcc developer
concerns; gcc-help@gcc.gnu.org is more apropriate for this question.
> If a code uses RTTI, can it be compiled with -fno-rtti ?
No. RTTI requires type_info nodes, which it uses to identify types at
runtime. For example, dynamic_cast<> works by comparing type_info nodes.
If you compile code which uses dynamic_cast<> or typeid with -fno-rtti,
g++ will generate an error.
>
> Why is it that for some codes -fno-rtti decreases codesize by as
> much as 5x?
Every type in a C++ program needs a type_info node. C++ programs often
contain many, many types. Thus the size increase.
However, in my experience, I do not think I have ever seen 5x
increase; 15-30% (1.15x to 1.3x) is more common.
[snip]
next parent reply other threads:[~2000-04-01 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20000313103358.C25605@neel>
2000-03-13 11:20 ` llewelly [this message]
2000-04-01 0:00 ` -fno-rtti llewelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0003131206280.18330-100000@dbritsch.dsl.xmission.com \
--to=llewelly@dbritsch.dsl.xmission.com \
--cc=NEELAKANTH.NADGIR@SUN.COM \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).