bug-m4
[Top][All Lists]
Advanced

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

Re: A manual problem about quoted string


From: Eric Blake
Subject: Re: A manual problem about quoted string
Date: Tue, 31 May 2011 09:44:31 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

On 05/31/2011 09:38 AM, wu liang wrote:
> Sir,
> In the chapter 5, there is example as:
> ----------------------------------
> define(`foo’, `This is macro `foo’.’)
> The ‘foo’ in the expansion text is not expanded, since it is a quoted
> string, and not a name.
> ----------------------------------
> However, according to my test, this will cause infinite loop of
> printing. I think that each 'foo' will be expanded and whether it is
> quoted only affects when it is expanded.

Thanks for the report.  However, I think the manual is correct as is,
given my simple test (not to mention that 'make check' runs all the
examples in the manual, and has not detected any problems with this
example):

$ m4 <<\EOF
> define(`foo',`This is macro `foo'.')
> foo
> EOF

This is macro foo.
$

Please show your particular test to back up your claim; most likely, the
bug is in your test setup and not in m4 or in the manual.  Did you
perhaps use changequote to some other quote characters before trying the
define?  Does using 'm4 -deaqt' give any more insight into the infinite
loop (warning, that can produce a lot of output on anything larger than
a trivial test)?

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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