From owner-freebsd-current Thu Dec 7 04:37:20 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA07449 for current-outgoing; Thu, 7 Dec 1995 04:37:20 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA07444 for ; Thu, 7 Dec 1995 04:37:09 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id XAA08175; Thu, 7 Dec 1995 23:28:12 +1100 Date: Thu, 7 Dec 1995 23:28:12 +1100 From: Bruce Evans Message-Id: <199512071228.XAA08175@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.tfs.com Subject: Re: changes in -current..TEST please Cc: current@freebsd.org, imb@scgt.oz.au, julian@ref.tfs.com, terry@lambert.org Sender: owner-current@freebsd.org Precedence: bulk >> 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