Test that regression in 1.4.9's eval doesn't recur.
[m4.git] / TODO
blob43eaa47c3659f30c2cacc339d27da0734845090f
1 GNU m4 TODO - Tasks that need implementing.             -*- outline -*-
2 Copyright (C) 2000, 2001, 2006, 2007 Free Software Foundation, Inc.
4 Tell the maintainers at <bug-m4@gnu.org> if you feel like volunteering
5 for any of these ideas or if you have others to add.
7 * KNOWN BUGS
9   + m4wrap.1.test fail on Solaris 2.6 using egcs 1.1a compiler (Erick B).
11   + The test case `other-tests/stackovf.test' does not work.
13   + stack overflow is basically broken
15     The routines to detect stack overflow throuh segv  are basically
16     broken. The idea may be fine, but it ends up calling a sigv handler
17     that uses gettext, printf, stdout... all of which are definitely NOT
18     sig-safe.  Pity, because the hardcode routine is basically very careful
19     to use write(2), to avoid this.
21     I haven't checked that translation magic is signal-safe.
22     - I doubt it;
23     - stdio is not signal-safe in any kind of portable setting anyways.
24     --
25     Marc Espie
26     espie@schutzenberger.liafa.jussieu.fr
29 * FEATURES OR PROBLEMS
31   + m4 should keep an ``execution stack'' of macros, which applications could
32     use in their error messages.
34   + Implement discarding comment delimiters with the syntax table.
36   + Implement qindir.  Like indir, except that the result of the macro call
37     is not expanded.  Because the input stack might contain a file or a
38     string, it is probably best achieved by making note that the TOS input
39     should be copied rather than rescanned.
41       $ echo "a'b" > f
42       $ m4
43       define(a,z)dnl
44       include(f)dnl
45       z'b
46       indir(`include', f)dnl
47       z'b
48       qindir(`include', f)dnl
49       a'b
50       define(b,NONO)dnl
51       patsubst(qindir(`include', f), `b', x)
52       z'x
54   + Use the TOS input quoting for qindir to fix this bug:
56       define(`x', -'-)
57       define(y, defn(`x'))
58       y
59       --'
60     --
61     Stepan Kasal <kasal@ucw.cz>
63   + If configured --with-gmp for multiple precision arithmetic there are
64     some warnings, but it passes the tests.
66   + Make m4 show include dependencies like gcc so Makefile targets are
67     updated when their (included) input files are updated (Erick B).
69   + Add support for wide character sets.
72 * OPTIMIZATION AND CLEAN UP
74   + Have NULs go really undisturbed through GNU m4
75         GNU m4 is lousy regarding NULs in streams (this would require
76         maintaining the string lengths, and avoiding strlen, strcpy,
77         etc.).
79   + The argument count limits are handled for all tokens passed around by
80     the internals:  we should enable attaching these values to text macros
81     too.
83   + The context parameter is just a placeholder for formerly global state.
84     We should be making the library reentrant so that multiple instances
85     of m4 can be run in the same process at the same time.
87   + The path management stuff (in path.c/m4private.h) is reinventing the
88     wheel.  There are a bunch of fast path management and search functions
89     in ltdl.c:  These need to be sanitized, exported through ltdl.h, and
90     then wrapped by the m4module.h path api.  path.c can probably be removed
91     entirely at that point.
93 * MODULE SPECIFIC ISSUES
95   + Some way of linking a module statically is needed, for systems
96     without support for dynamic loading.
98   + Some sort of module interface versioning system needs to be implemented
99     in the module loader and the freezer so that m4 can tell if it is being
100     asked to load a frozen file that requires versions of modules with
101     interface versions unsupported by the current release.
103   + Setting of the module search path within m4 scripts:
105         append(__modulepath__, `/some/modules/live/here')
107   + Module autoloader.  This would allow an m4 core with no builtins except
108     for loadmodule().  A default startup script would mark the recognised
109     set of builtins for autoload from the installed module directory on first
110     use.  A new cli parameter would inhibit initialisation from this script,
111     so that customised m4 interpreters could be built on the fly!
113   + The module loader needs to differentiate between modules that are in
114     memory and modules that are loaded (i.e. visible) from various context
115     structures.
117   + The perl module should only be built if a suitable perl interpreter
118     is found on the build machine.
120 * OTHER TOOLS
122   + Automake 1.5 doesn't seem to like pkglibexec_LTLIBRARIES +=
123     See modules/Makefile.am.