public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "licheng.1212 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/49258] -ffunction-sections and --gc-sectinons have no effect at gcj
Date: Mon, 09 Apr 2012 11:15:00 -0000 [thread overview]
Message-ID: <bug-49258-8172-vgriDZ1MoV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49258-8172@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49258
--- Comment #6 from licheng.1212 at gmail dot com <licheng.1212 at gmail dot com> 2012-04-09 11:14:56 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > Yes,but why we can't remove the function notused() form vtable, since this
> > function will never used.
>
> How can you tell? Without the full exectuable and knowing the entry point,
> there is no way (-fwhole-program can help but it becomes a turning machine at
> that point).
class hello{
public void notused()
{
System.out.println("not used");
}
public static void main(String argv[])
{
System.out.println("Hello");
}
}
this is a full execlutable program,and it hava only one entry point "main"!
and i test a c++ file,it will remove the unused funcitons "notused":
[licheng@Soft04 ~]$ cat hello.cpp
#include <iostream>
class hello
{
public:
hello()
{
}
void notused()
{
std::cout << "not used";
}
void used()
{
std::cout << "used";
}
~hello()
{
}
}hi;
int main()
{ hello t;
t.used();
return 0;
}
[licheng@Soft04 ~]$
next prev parent reply other threads:[~2012-04-09 11:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 15:56 [Bug java/49258] New: " licheng.1212 at gmail dot com
2011-06-01 16:08 ` [Bug java/49258] " licheng.1212 at gmail dot com
2011-12-31 0:05 ` pinskia at gcc dot gnu.org
2012-04-07 7:54 ` licheng.1212 at gmail dot com
2012-04-07 8:50 ` pinskia at gcc dot gnu.org
2012-04-07 9:02 ` licheng.1212 at gmail dot com
2012-04-07 12:11 ` schwab@linux-m68k.org
2012-04-07 18:09 ` pinskia at gcc dot gnu.org
2012-04-09 11:15 ` licheng.1212 at gmail dot com [this message]
2012-04-09 19:41 ` pinskia at gcc dot gnu.org
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=bug-49258-8172-vgriDZ1MoV@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=java-prs@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).