Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2025 12:35:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 240571] m4 divert( X-with-spaces ) -> argument is invalid
Message-ID:  <bug-240571-227-INumDfYAAS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-240571-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240571

eblake@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eblake@redhat.com

--- Comment #1 from eblake@redhat.com ---
divert( -1 ) is the same as divert(`-1 ').

POSIX says:

It shall be an error to specify an argument containing any non-numeric
characters.

The leading space is eaten (divert never sees it), but the trailing space is
non-numeric, so the code is correct that you have supplied invalid input, and
it can therefore do whatever it wants.  However, whether "whatever it wants"
means ignoring the trailing space, printing an error, or anything else is a
matter of quality of implementation; and if that behavior has changed over time
you can certainly complain about regressions.  And in this case, `m4 -g'
exiting on invalid input is not the same as GNU m4's behavior of printing the
warning but then proceeding without changing the current diversion number.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240571-227-INumDfYAAS>