Re: A manual problem about quoted string
Eric Blake <eblake <at> redhat.com>
2011-05-31 15:44:31 GMT
On 05/31/2011 09:38 AM, wu liang wrote:
> 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
$ m4 <<\EOF
> define(`foo',`This is macro `foo'.')
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