[Top][All Lists]

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

Re: gcc -Wall warning for minmax.h

From: Stepan Kasal
Subject: Re: gcc -Wall warning for minmax.h
Date: Tue, 7 Jun 2005 21:46:39 +0200
User-agent: Mutt/1.4.1i


On Tue, Jun 07, 2005 at 10:19:47AM -0400, Derek Price wrote:
> >- we have to document also the fact that AS_TR_SH & AS_TR_CPP expand
> >  to literal variable (symbol) name, if their argument is a literal
> I didn't think this was important from the user's perspective.

In the patch I proposed, I used gl_CACHE_VAR as the second argument
That argument cannot contain backticks, see the Appendix below.

That explains why I relied on the feature, and why I wanted to document it.
But yes, it's better to fix AC_CACHE_CHECK to remove this limitation.

After that fix, we could also remove the AS_LITERAL_IF with m4_fatal.

I'm happy that AS_LITERAL_IF will stay undocumented.
m4_fatal and m4_warning should be documented, though.

Have a nice day,

If gl_CACHE_VAR expanded to

        `echo "xyz-xyz" | sed ...`

then you get something like:

eval "test \"\${gl_CACHE_VAR+set}\" = set"

eval "test \"\${`echo "xyz-xyz" | sed ...`+set}\" = set"

And this construct is not portable, see the first paragraph of node
"Shell Substitutions".

This can be fixed: AS_VAR_TEST_SET could in this case expand to
        as_var=`echo "xyz-xyz" | sed ...`
        eval "test \"\${$as_var+set}\" = set"

reply via email to

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