NetBSD Problem Report #485

From gnats  Sun Sep 18 10:31:30 1994
Received: from honey.idt.unit.no (honey.idt.unit.no [129.241.111.50]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id KAA07486 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 18 Sep 1994 10:31:24 -0700
Message-Id: <199409181732.TAA06456@honey.idt.unit.no>
Date: Sun, 18 Sep 1994 19:32:57 +0200
From: jarle@idt.unit.no
Reply-To: jarle@idt.unit.no
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Cc: tegge@idt.unit.no
Subject: m4 bug
X-Send-Pr-Version: 3.2

>Number:         485
>Category:       bin
>Synopsis:       m4 bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 18 10:35:02 +0000 1994
>Closed-Date:    Sat Jan 13 23:21:17 +0000 1996
>Last-Modified:  Sat Jan 13 23:43:43 +0000 1996
>Originator:     Jarle Greipsland
>Release:        1.0_BETA
>Organization:
Free Hardware Foundation, UnLtd.
>Environment:

System: NetBSD honey.idt.unit.no 1.0_BETA NetBSD 1.0_BETA (HONEY) #0: Sat Sep 10 01:46:25 MET DST 1994 jarle@honey.idt.unit.no:/local/src/sys/arch/i386/compile/HONEY i386
Phase of the moon: The Moon is Waxing Gibbous (99% of Full)

>Description:
According to the manual page, the m4 command 'changecom' shall accept multi
character strings as comment delimiters (max 5 chars).  This doesn't work,
because of the comment delimiter type being a single char.  Also, if the
input file ends within a comment, m4 will spew 'EOF-chars' until stopped by
some external cause.

>How-To-Repeat:
Run m4 with a input file containing the following line:
changecom(`/*',`*/')/

>Fix:
Alternative 1: Fix the manual page (i.e. allow only one char for comment
delimiters).  This alternative make us a bit 'incompatible'.....
Alternative 2: Change the scommt/ecommt datatype to char *, and modify 
the loop in main.c to take this into account.  Also handle EOF within 
comments....

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pk 
State-Changed-When: Sat Jan 13 18:21:17 EST 1996 
State-Changed-Why:  
Multi-character comment and quote delimiters now implemented. 
Fix also forwarded to Ozan Yigit <oz@sis.yorku.ca>. 
>Unformatted:

 m4 doesn't handle multicharacter comment delimiters at all

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.