Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 1995 13:54:41 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        imb@scgt.oz.au (michael butler)
Cc:        julian@ref.tfs.com, current@FreeBSD.org
Subject:   Re: changes in -current..TEST please
Message-ID:  <199512032054.NAA09061@phaeton.artisoft.com>
In-Reply-To: <199512030403.PAA20533@asstdc.scgt.oz.au> from "michael butler" at Dec 3, 95 03:03:16 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512032054.NAA09061>