bug-autoconf
[Top][All Lists]
Advanced

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

Autoconf should fail if there are macros with invalid names


From: Demi Marie Obenour
Subject: Autoconf should fail if there are macros with invalid names
Date: Tue, 21 Feb 2017 15:04:27 -0500

While it is possible to avoid unexpected macro invocations by
overquoting all text that could possibly be part of a macro, neither
Autoconf itself nor most user code does this.  Unexpected macro
expansion would likely cause problems that would be difficult to debug.
 Therefore, Autoconf should fail if a macro has a name that is likely
to clash with user code.

I propose that all macro names that could possibly be expanded directly
(as opposed to only being expanded indirectly via indir or defn), and
which are not builtins like dnl, be whitelisted against the regex 
/_?(m4[A-Za-z0-9_]*|[A-Z]+_[A-Z]+)/ – that is, they must either be
within the namespace reserved by m4sugar, or they must consist only of
capital letters and underscores, may only have at most one leading
underscore, and must have at least one interior underscore.



reply via email to

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