Subject: misc/2914: m4 man page mentions $@, which isn't implemented
To: None <gnats-bugs@gnats.netbsd.org>
From: Brian C. Grayson <bgrayson@marvin.ece.utexas.edu>
List: netbsd-bugs
Date: 11/04/1996 22:57:13
>Number: 2914
>Category: misc
>Synopsis: m4(1) mentions $@, which isn't implemented.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 4 21:35:02 1996
>Last-Modified:
>Originator: Brian Grayson
>Organization:
>Release: 1.2, 1.2-current (110296)
>Environment:
System: NetBSD marvin 1.2 NetBSD 1.2 (MARVIN) #1: Tue Oct 1 21:46:42 CDT 1996 bgrayson@marvin:/a/orac/home/orac/src/sys/arch/i386/compile/MARVIN i386
>Description:
In the man page for m4(1), under the paragraph on 'define', it
mentions that:
$* is replaced by all arguments comma separated; $@ is the
same as $* but all arguments are quoted against further expansion.
>How-To-Repeat:
echo 'define(foo1,$*) define(foo2,$@) foo1(a,b,c) foo2(a,b,c)' | m4
The output on a Sun using System V m4 is what is expected:
a,b,c a,b,c
but on NetBSD we get this instead:
a,b,c $@
>Fix:
From an examination of eval.c and serv.c in
/usr/src/usr.bin/m4, it looks like the $@ is never detected,
and thus the man page is in error, so the fix would be to
remove the reference to $@ in the man page. It could be that
this is really a missing-but-important-feature in m4, in
which case this should be a bin bug instead of a misc/doc-bug.
>Audit-Trail:
>Unformatted: