On Mon, Mar 26, 2012 at 08:58:15AM +0200, Mark Kettenis wrote:
> > Date: Sun, 25 Mar 2012 23:11:17 -0700
> 
> It is GNU "policy" to compile with debug options enabled.  Not a bad
> policy, since it makes for easier debugging when you encounter a bug.
> It's the same reason why I always compile my kernels with -g.

But other GNUish programs don't spew when invoked with YYDEBUG=1
in the environment (that I've found).  Neither NetBSD's nor Linux's
(CentOS) lds spew.

> Why the origional poster certainly was suprprised, I don't think it's
> a serious issue.  I don't think there is a huge overhead, and the
> behaviour has been present since 1995 and I've never seen anybody
> complain about it.  And one day, this may become handy.

It is not a serious issue insofar as causing incorrect operation,
I agree.  There are easy and obvious workarounds.

As far as "handy", consider:

[djv@aemilia ~ 1:3067]$ cat foo.c
int 
main()
{
        exit(0);
}

The default make, with YYDEBUG=1 exported:

[djv@aemilia ~ 1:3066]$ make foo 2>&1 | wc
    6512   59320  382837
[djv@aemilia ~ 1:3067]$ 

That's not *handy*.  The hazard is in losing real errors and warnings
in the spew.

This is "no biggie", and I brought it up since the devs might have
a policy opinion on the matter.  I've been fooling around with yacc
for many a year, and, as you say, haven't had occasion to notice
this before.

Dave
-- 
   "If government had taken over the auto industry in 1920, today we'd
   all be driving Model-T cars -- and saying, 'If it weren't for the
   government, we'd have no cars at all.'"     -- Harry Browne

Reply via email to