From owner-freebsd-current Mon Dec 4 02:10:24 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA16064 for current-outgoing; Mon, 4 Dec 1995 02:10:24 -0800 Received: from critter.tfs.com ([140.145.230.252]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id CAA16055 for ; Mon, 4 Dec 1995 02:10:17 -0800 Received: from localhost.tfs.com (localhost.tfs.com [127.0.0.1]) by critter.tfs.com (8.6.12/8.6.12) with SMTP id KAA00283; Mon, 4 Dec 1995 10:07:38 GMT X-Authentication-Warning: critter.tfs.com: Host localhost.tfs.com didn't use HELO protocol To: Terry Lambert cc: imb@scgt.oz.au (michael butler), julian@ref.tfs.com, current@FreeBSD.org Subject: Re: changes in -current..TEST please In-reply-to: Your message of "Sun, 03 Dec 1995 13:54:41 MST." <199512032054.NAA09061@phaeton.artisoft.com> Date: Mon, 04 Dec 1995 10:07:38 +0000 Message-ID: <281.818071658@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-current@FreeBSD.org Precedence: bulk Terry, read your manuals again before you talk about things you don't know too much, and certainly not enough, about. > > GCC, at optimisation levels > 1, will remove data (and code) which it > > considers to be unreferenced. _dummy_cleanup is declared 'static' yet is > > unreferenced in the file in which it appears. Given that 'static' implies > > 'local to this file', this is valid behaviour. However, since the variable > > in question really is intended to be used by things external to kern_xxx.c, > > perhaps it should not be declared 'static' and GCC will leave it alone at > > all optimisation settings .. > > How is dummy_cleanup "not referenced"? > > phaeton: {50} grep dummy_cleanup *.c > kern_xxx.c:dummy_cleanup() {} > kern_xxx.c:TEXT_SET(cleanup_set, dummy_cleanup); > > Looks referenced to me. > > I think GCC is doing bogus things. > > Is it also removing "cleanup_set"? That would be so incredibly bogus > as to cause all C++ and most of the FreeBSD kernel to fail miserably. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.