🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51093

Re: how do I optimize this?

#51093
From: Fergus James HENDERSON
Date: Wed, 30 Jun 1993 18:22
25 lines
1542 bytes
leisner@hydrus (Marty Leisner x71348 ) writes:

>If I have code like:
>
>static char foo[] = "this is a test";
>
>main()  {  }
>
>how would the compiler optimize by not
>even including foo in the object? (since there
>is no reason to). 

Often such unused variables are named ``rcsid'' or ``sccsid'', etc.,
in which case there *is* a reason for including them in the object
file.

Have a look in the file toplev.c, around the middle (roughly lines 1800-2200),
there are some comments about this sort of thing, and also about unused
static functions, etc.

-- 
Fergus Henderson                     This .signature virus might be
fjh@munta.cs.mu.OZ.AU                getting old, but you still can't
                                     consistently believe it unless you
Linux: Choice of a GNU Generation    copy it to your own .signature file!
Technical Details
Message-ID: <9318204.4461@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!caen!batcomputer!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
References: <1993Jun28.160124.16176@spectrum.xerox.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,477330dbf4257f34
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-06-30 11:28:14 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!caen!batcomputer!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: how do I optimize this?
Message-ID: <9318204.4461@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <1993Jun28.160124.16176@spectrum.xerox.com>
Date: Wed, 30 Jun 1993 18:22:13 GMT
Lines: 25