This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=400b93fe78014c96de11d6e18198ddd38639ca3c The branch, branch-1.6 has been updated via 400b93fe78014c96de11d6e18198ddd38639ca3c (commit) from b8829779ba82826040f16fe78420f0e5a2fe881e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 400b93fe78014c96de11d6e18198ddd38639ca3c Author: Eric Blake <[EMAIL PROTECTED]> Date: Thu Aug 21 07:52:14 2008 -0600 Fix crash with traced defn(undef), regression from 2007-08-09. * src/builtin.c (m4_defn): Handle traced but undefined macros. * doc/m4.texinfo (Trace): Test it. * NEWS: Document it. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> (cherry picked from commit 349bbb7400ee079878cb5859ee850a2b34a74c40) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++++ NEWS | 10 ++++++---- doc/m4.texinfo | 5 ++++- src/builtin.c | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 533bc55..0e06082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-21 Eric Blake <[EMAIL PROTECTED]> + + Fix crash with traced defn(undef), regression from 2007-08-09. + * src/builtin.c (m4_defn): Handle traced but undefined macros. + * doc/m4.texinfo (Trace): Test it. + * NEWS: Document it. + 2008-08-18 Eric Blake <[EMAIL PROTECTED]> Remove deprecated -N option; fixes a regression from 2006-09-14. diff --git a/NEWS b/NEWS index 77472fe..109c80a 100644 --- a/NEWS +++ b/NEWS @@ -9,13 +9,15 @@ Foundation, Inc. a macro. This was most noticeable with `traceon(`traceon')', but would also happen in cases such as `foo(traceon(`foo'))'. -** Fix regressions introduced in 1.4.10b but not present in 1.4.11: +** Fix regressions introduced in 1.4.10b: *** Using `builtin' or `indir' to perform nested `shift' calls triggered - an assertion failure. + an assertion failure (not present in 1.4.11). *** The command-line option -dV, as well as the builtin `debugmode(V)', - failed to enable `t' and `c' debug options. + failed to enable `t' and `c' debug options (not present in 1.4.11). *** Comments that contain unbalanced quotes were not rescanned correctly - when passed through [EMAIL PROTECTED] + when passed through $@ (not present in 1.4.11). +*** Using `defn' on a traced but undefined macro triggered an assertion + failure (also present in 1.4.11, but not 1.4.12). ** Remove the undocumented command-line option '-N', as no one complained about the assertion failure regression that it introduced in 1.4.7. diff --git a/doc/m4.texinfo b/doc/m4.texinfo index bfb6108..7540b2e 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -3770,6 +3770,9 @@ traceon(`foo') @result{} foo @result{}foo +defn(`foo') [EMAIL PROTECTED]:stdin:4: Warning: defn: undefined macro `foo' [EMAIL PROTECTED] define(`foo', `bar') @result{} foo @@ -3780,7 +3783,7 @@ undefine(`foo') ifdef(`foo', `yes', `no') @result{}no indir(`foo') [EMAIL PROTECTED]:stdin:8: Warning: indir: undefined macro `foo' [EMAIL PROTECTED]:stdin:9: Warning: indir: undefined macro `foo' @result{} define(`foo', `blah') @result{} diff --git a/src/builtin.c b/src/builtin.c index cc21ea2..b8449a0 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -1044,7 +1044,7 @@ m4_defn (struct obstack *obs, int argc, macro_arguments *argv) continue; } s = lookup_symbol (ARG (i), ARG_LEN (i), SYMBOL_LOOKUP); - if (s == NULL) + if (s == NULL || SYMBOL_TYPE (s) == TOKEN_VOID) { m4_warn (0, me, _("undefined macro %s"), quotearg_style_mem (locale_quoting_style, ARG (i), hooks/post-receive -- GNU M4 source repository
