autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: empty test


From: Ralf Wildenhues
Subject: Re: empty test
Date: Mon, 10 Apr 2006 13:34:01 +0200
User-agent: Mutt/1.5.11

Hi Eric,

* Eric Blake wrote on Sun, Apr 09, 2006 at 03:17:36PM CEST:
> 
> > Erm, instead of the
> >   :; $1
> > 
> > could we just have
> >   m4_default([$1], [:])
> > 
> > please?  This avoids the size overhead incurred for the non-pathological
> > case.
> 
> Except that with your idea, with AT_CHECK([ ]) (note the space), the 
> m4_default
> sees it as non-empty but shell syntax disagrees.

So?  In my eyes ` ' simply isn't a valid test.  We don't have to
make everything work here.  I thought you were just trying to
prevent inadvertent failures, and not just failures due to all
kinds of user silliness.

> I went the course of minimally invasive patch, by always ensuring
> valid syntax (assuming, of course, that the shell snippet handed to
> AT_CHECK is also valid outside of a subshell), rather than trying to
> play m4 games to guess when syntax is valid.  Of course, how we handle
> something like AT_CHECK([;]) is up in the air, since by itself, ";" is
> not valid as a script outside of a subshell, nor would it be valid
> with either of our proposals.

Easy: we don't handle it.

I know this whole discussion has a color-of-bike-shed touch, but: the
macro you are changing lies in the hottest path of both autom4te and
shell execution: it's expanded 1500 times in the Autoconf test suite;
let's avoid unnecessary stuff in there if we can; even more so, when
the concerns we have are completely theoretical.

I have a real argument against `:;': it clutters the trace output of
  ./testsuite -x

by adding a line
  + : 

where, each time, I will wonder whether some variable
default-initialization may have happened as side-effect.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]