[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev [PATCH][dev22] Fix --disable-trace, #includes
From: |
John Bley |
Subject: |
Re: lynx-dev [PATCH][dev22] Fix --disable-trace, #includes |
Date: |
Sun, 18 Apr 1999 10:35:16 -0400 (EDT) |
On Sun, 18 Apr 1999, Klaus Weide wrote:
> There must have been a -DDEBUG somewhere or a '#define DEBUG' in some
> unexepected .h file...
It's possible. I'll grep for that later.
> I did a very small test (gcc Debian GNU/Linux package 2.7.2.3-7) with:
>
> #include <stdio.h>
> int main(int argc, char **argv)
> {
> if (0) fprintf(stderr, "%s", "foo bar\n");
> return 0;
> }
>
> No matter what different gcc flags I tried, the string "foo bar" was
> still in the binary (as shown by 'string')... Aparently gcc
> optimization is much stupider in this respect than what I would have
> expected. I guess that all constant strings are handled very early in
> the compilation process, and then never checked whether actually
> referenced after subsequent optimization passes.
Yes, I tried a similar experiment. This is what makes me think that
I should just complain to the gcc folk and not worry about the lynx
code. Well, this part of the lynx code.
> I don't think all compilers act like that
I hope not. Maybe I'll try egcs and see if they fixed it.
--
John Bley - address@hidden
Duke '99 - English/Computer Science
Since English is a mess, it maps well onto the problem space,
which is also a mess, which we call reality. - Larry Wall