Re: Fix for compiling m4 on VAX

John Klos <[email protected]> Wed, 30 Oct 2013 23:08:41 +0000 (UTC)
Newsgroups gmane.comp.gnu.m4.patches,gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
Hi,

>> This change needs to be incorporated upstream in gnulib (cc'd); from
>> there it will find its way into the next m4 release.

Thank you.

> What compiler is being used, and what macros does this compiler
> predefine?

gcc (GCC) 4.1.3 20080704 prerelease (NetBSD nb3 20111107)
The common relevant macros are __vax__ (for OpenBSD, too - no idea about 
GNU/Linux or if that port even exists any more) and, of course, 
__NetBSD__.

> More generally:
>
> Why is the change needed?  What happens, exactly, if you don't
> have the change?
> 
> The VAX doesn't have NaNs at all, right?  So that section of
> code shouldn't be compiled at all: isnan should simply return
> 0 without inspecting its argument.  That is the real bug that
> needs to get fixed here.

Without it, compiling m4 fails:
http://mail-index.netbsd.org/tech-pkg/2010/03/24/msg005186.html

And yes, VAXen have no NaNs, so yes, isnan would never possibly return 
true on VAX.