From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32107 invoked by alias); 9 Apr 2012 19:41:26 -0000 Received: (qmail 32074 invoked by uid 22791); 9 Apr 2012 19:41:25 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Apr 2012 19:41:14 +0000 From: "pinskia at gcc dot 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 19:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2012-q2/txt/msg00021.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49258 --- Comment #7 from Andrew Pinski 2012-04-09 19:40:41 UTC --- (In reply to comment #6) > and i test a c++ file,it will remove the unused funcitons "notused": But that is not the same as there is no vtable for hello. Try: #include class hello { public: hello() { } virtual void notused() { std::cout << "not used"; } virtual void used() { std::cout << "used"; } virtual ~hello() { } }hi; int main() { hello t; t.used(); return 0; } And see the result.