[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev removing strings used in CTRACE when configured without tra
Re: lynx-dev removing strings used in CTRACE when configured without tracing
Thu, 15 Apr 1999 15:55:38 +0500 (SAMST)
On Sun, 18 Apr 1999, John Bley wrote:
> On Thu, 15 Apr 1999, Vlad Harchev wrote:
> > The are several approaches:
> > 1)Use a feature of gcc - macros with variable number of arguments, in this
> > case we can do the following
> Non-portable. Not a good fix. Nice to know it exists though, thanks.
> > 2) First I've written the following script
> > 3) So I wrote the the small program using lex (it does the same as script
> > above, but very fast).
> These are both good ideas, but I'm leery of letting scripts modify 1000+
> lines of code in this manner. I don't think there's an easy way to fix this
> properly. It's best to just let it slide for now, perhaps worry about it
> after 2.8.2.
> I'm almost positive this is a bug in the C compiler. Perhaps
> I'll take umbrage with the gcc folk.
Removing the strings from dead code is not yet implemented in gcc and
egcs-1.1.1. Here is a quote from eqcs-1.1.1/gcc/PROJECTS
| * Constants in unused inline functions
| It would be nice to delay output of string constants so that string
| constants mentioned in unused inline functions are never generated.
| Perhaps this would also take care of string constants in dead code.
Tho' egcs-1.1.1 is not a latest release.
As for scripts that modify the 1000+ lines of code, I can say the following:
I consider lex lexer built from the file I sent to be reliable. The best way
to test it is to change all *.c file in lynx distibution and try to compile
it. If you wish, I can do it myself and send a big patch here. I was confused
by the need to send ~100 kb patch, but now I relalize I should do it...