Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 1995 23:28:12 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, phk@critter.tfs.com
Cc:        current@freebsd.org, imb@scgt.oz.au, julian@ref.tfs.com, terry@lambert.org
Subject:   Re: changes in -current..TEST please
Message-ID:  <199512071228.XAA08175@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Why not initialize a pointer to the function?  Then the function address
>> _is_ used provided the pointer doesn't go away.  Why does the comma
>> expression end with an 0 anyway?  The following seems to work right
>> (except it wastes a pointer):
>> 
>> 	static void (*const foo)(void) = dummy_cleanup;

>Well, what would prevent gcc from going

>	foo isn't used, zap it.
>	now dummy_cleanup isn't used, zap it.
>?

Nothing except conventions.  There has to be a convention to stop it
removing rcsid strings, etc.  gcc's conventions seem to be that static
static data is never removed but static non-const data is warned about.  

Bruce



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