[Top][All Lists]

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

Re: Fwd: BUG report using autoconf…

From: Eric Blake
Subject: Re: Fwd: BUG report using autoconf…
Date: Mon, 5 Feb 2018 16:55:02 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/05/2018 04:49 PM, aotto wrote:
You are correct that autoconf's detection of unexpanded macros is
unaware of comment syntax.  Would you like to prepare a patch to the
post-processing pass that looks for unexpanded macros to first filter
out all comment lines?

Checking for unexpected names inside comments is different from checking for intentional output embedded in error messages, where the code has to work even without comments protecting the text.

the problem is not only the comment… today I had a "string" with macroname inside in the file acinclude.m4… and "aclocal --force -I m4" run "forever" and eat all my memory… example:

    AS_IF([test "x$config_site" = "xyes"], [
      AC_MSG_NOTICE(["ENABLE_DEBUG: using 'config.site' defaults"])

if you switch ENABLE_DEBUG to SC_ENABLE_DEBUG… then you have a really BIG problem… :-)

That's why the manual suggests that you use a quadrigraph for cases like that, as in:

AC_MSG_NOTICE(["SC_@&address@hidden: ...."])

where the @&t@ quadrigraph expands to the empty string AFTER all checking for unexpanded macros has taken place, and its presence in the meantime is enough to prevent unintended infinite recursion of trying to expand the SC_ENABLE_DEBUG macro from its own output.

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

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