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=ff87075d2c0465d5426c8004680b033f13ad893e The branch, branch-1_4 has been updated via ff87075d2c0465d5426c8004680b033f13ad893e (commit) from e043e9e76d6953676ed870a6f47be9723363b7cb (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 ff87075d2c0465d5426c8004680b033f13ad893e Author: Eric Blake <[EMAIL PROTECTED]> Date: Thu Mar 6 17:17:37 2008 -0700 Fix nested builtin(`shift',$@) regression from 2008-02-22. * src/macro.c (make_argv_ref_token): Don't output expansion text when making wrapper for builtin or indir. * doc/m4.texinfo (Builtin): Test it. * NEWS: Document the fix. Reported by Andreas Schwab. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 9 +++++++++ NEWS | 3 ++- doc/m4.texinfo | 17 +++++++++++++++++ src/macro.c | 5 +++-- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e82fcb7..aa9745a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-06 Eric Blake <[EMAIL PROTECTED]> + + Fix nested builtin(`shift',$@) regression from 2008-02-22. + * src/macro.c (make_argv_ref_token): Don't output expansion text + when making wrapper for builtin or indir. + * doc/m4.texinfo (Builtin): Test it. + * NEWS: Document the fix. + Reported by Andreas Schwab. + 2008-03-04 Eric Blake <[EMAIL PROTECTED]> Make GNUmakefile work with in-place builds. diff --git a/NEWS b/NEWS index 42922d1..7a88383 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,8 @@ Foundation, Inc. * Noteworthy changes in Version 1.4.11 (????-??-??) [stable] Released by ????, based on git version 1.4.10b.x-* -** No user visible changes, yet. +** Fix regression introduced in 1.4.10b where using `builtin' or `indir' + to perform nested `shift' calls triggered an assertion failure. * Noteworthy changes in Version 1.4.10b (2008-02-25) [beta] Released by Eric Blake, based on git version 1.4.10a diff --git a/doc/m4.texinfo b/doc/m4.texinfo index 92a8eff..7b249bd 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -2542,6 +2542,23 @@ builtin(`builtin',) builtin(`include', `foo')dnl @result{}bar @end example + [EMAIL PROTECTED] And this example triggers a regression present in 1.4.10b. + [EMAIL PROTECTED] +define(`s', `builtin(`shift', $@@)')dnl +define(`loop', `ifelse(`$2', `', `-', `$1$2: $0(`$1', s(s($@@)))')')dnl +loop(`1') [EMAIL PROTECTED] +loop(`1', `2') [EMAIL PROTECTED]: - +loop(`1', `2', `3') [EMAIL PROTECTED]: 13: - +loop(`1', `2', `3', `4') [EMAIL PROTECTED]: 13: 14: - +loop(`1', `2', `3', `4', `5') [EMAIL PROTECTED]: 13: 14: 15: - [EMAIL PROTECTED] example @end ignore @node Conditionals diff --git a/src/macro.c b/src/macro.c index 0846f8d..4558e9c 100644 --- a/src/macro.c +++ b/src/macro.c @@ -1303,8 +1303,9 @@ make_argv_ref_token (token_data *token, struct obstack *obs, int level, unsigned int i; for (i = 0; i < argv->arraylen; i++) { - if (TOKEN_DATA_TYPE (argv->array[i]) == TOKEN_COMP - && argv->array[i]->u.u_c.wrapper) + if ((TOKEN_DATA_TYPE (argv->array[i]) == TOKEN_COMP + && argv->array[i]->u.u_c.wrapper) + || level >= 0) break; if (index == 1) { hooks/post-receive -- GNU M4 source repository
