[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4 fails to expand macros after changequote
From: |
Andreas F. Borchert |
Subject: |
Re: m4 fails to expand macros after changequote |
Date: |
Tue, 16 May 2023 23:26:11 +0200 |
On Tue, May 16, 2023 at 11:33:55AM -0500, Eric Blake wrote:
> On Tue, May 16, 2023 at 12:16:17PM +0200, Andreas F. Borchert wrote:
> >
> > Here is a minimal example that demonstrates the problem:
> >
> > changequote({,})dnl
> > define(P1, {changequote([,])`}$[]1{'changequote()})dnl
> > changequote()dnl
>
> This line is your problem. Per POSIX,
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/m4.html
>
[..]
>
> You have called changequote() which passes a single null argument,
> rather than a well-specified behavior of zero arguments or two
> non-null arguments.
Thank you, this is exactly the problem and fortunately easy to fix.
--
Dr. Andreas F. Borchert, Institut für Numerische Mathematik, Universität Ulm
Helmholtzstr. 20, 89081 Ulm, +49 7315023572 https://mathematik.uni-ulm.de/afb