From owner-freebsd-current Sun Dec 3 12:58:41 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA23556 for current-outgoing; Sun, 3 Dec 1995 12:58:41 -0800 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA23541 for ; Sun, 3 Dec 1995 12:58:39 -0800 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA09061; Sun, 3 Dec 1995 13:54:41 -0700 From: Terry Lambert Message-Id: <199512032054.NAA09061@phaeton.artisoft.com> Subject: Re: changes in -current..TEST please To: imb@scgt.oz.au (michael butler) Date: Sun, 3 Dec 1995 13:54:41 -0700 (MST) Cc: julian@ref.tfs.com, current@FreeBSD.org In-Reply-To: <199512030403.PAA20533@asstdc.scgt.oz.au> from "michael butler" at Dec 3, 95 03:03:16 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 984 Sender: owner-current@FreeBSD.org Precedence: bulk > 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. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.