[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m4 fails to expand macros after changequote
From: |
Andreas F. Borchert |
Subject: |
m4 fails to expand macros after changequote |
Date: |
Tue, 16 May 2023 12:16:17 +0200 |
Here is a minimal example that demonstrates the problem:
changequote({,})dnl
define(P1, {changequote([,])`}$[]1{'changequote()})dnl
changequote()dnl
define(`foo', `$1 is not P1')dnl
foo(`bar')
Running this example with GNU m4:
theon$ m4 --version
m4 (GNU M4) 1.4.19
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by René Seindal.
theon$ m4 bug.m4
foo(`bar')
theon$
In comparison, running this with Solaris 11.4 m4:
theon$ /usr/bin/m4 bug.m4
bar is not `$1'
theon$
Thanks & kind regards, Andreas F. Borchert
--
Dr. Andreas F. Borchert, Institut für Numerische Mathematik, Universität Ulm
Helmholtzstr. 20, 89081 Ulm, +49 7315023572 https://mathematik.uni-ulm.de/afb
- m4 fails to expand macros after changequote,
Andreas F. Borchert <=