From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 9 22:30:18 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E299031E for ; Tue, 9 Oct 2012 22:30:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id B0A848FC0A for ; Tue, 9 Oct 2012 22:30:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q99MUHrT043492 for ; Tue, 9 Oct 2012 22:30:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q99MUHI0043491; Tue, 9 Oct 2012 22:30:17 GMT (envelope-from gnats) Resent-Date: Tue, 9 Oct 2012 22:30:17 GMT Resent-Message-Id: <201210092230.q99MUHI0043491@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Peter Jeremy Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8928C17C7 for ; Tue, 9 Oct 2012 06:28:44 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 21CD79043B for ; Mon, 8 Oct 2012 23:58:06 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-178.belrs5.nsw.optusnet.com.au [220.239.248.178]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q98Nw3TT033384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Oct 2012 10:58:03 +1100 (EST) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q98NvtMo080417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Oct 2012 10:57:56 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q98Nvt4e080415; Tue, 9 Oct 2012 10:57:55 +1100 (EST) (envelope-from peter) Message-Id: <201210082357.q98Nvt4e080415@server.rulingia.com> Date: Tue, 9 Oct 2012 10:57:55 +1100 (EST) From: Peter Jeremy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/172534: [patch] FICL - correct handling of bare comment lines Cc: peter@server.rulingia.com X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Peter Jeremy List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2012 22:30:18 -0000 >Number: 172534 >Category: bin >Synopsis: [patch] FICL - correct handling of bare comment lines >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 09 22:30:16 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 8.3-STABLE amd64 >Organization: n/a >Environment: System: FreeBSD server.rulingia.com 8.3-STABLE FreeBSD 8.3-STABLE #18 r237444M: Sun Jul 8 10:47:08 EST 2012 root@server.rulingia.com:/var/obj/usr/src/sys/server amd64 >Description: Various forth files in sys/boot/ficl/softwords/ are converted to a C string code for embedding into the FICL binary using an awk script softcore.awk. This script fails to strip out comments that consist of a sole backslash. Whilst this isn't a problem for the standard set of SOFTWORDS, the not-normally-included oo.fr contains comments in the array-init definition that cause softcore.awk to emit the string "\ " - which gcc rejects. >How-To-Repeat: # cd /sys/boot/ficl uncomment the line 'SOFTWORDS+= oo.fr classes.fr' in Makefile # make testmain fails with: (cd /home/peter/forth/boot/ficl/softwords; cat softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr ifbrack.fr oo.fr classes.fr | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > softcore.c cc -O2 -pipe -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -std=gnu99 -m32 -march=i386 -I. -I/home/peter/forth/boot/ficl -I/home/peter/forth/boot/ficl/i386 -I/home/peter/forth/boot/ficl/../common -c softcore.c softcore.c:917:5: warning: unknown escape sequence: '\040' softcore.c:917:5: warning: unknown escape sequence: '\040' >Fix: According to diff on stable-8, the following patch does not result in any change to the default softcore.c and only removes the two "\ " lines when the optional object-oriented words are added. Index: sys/boot/ficl/softwords/softcore.awk =================================================================== --- sys/boot/ficl/softwords/softcore.awk (revision 241347) +++ sys/boot/ficl/softwords/softcore.awk (working copy) @@ -75,7 +75,7 @@ { gsub(/\t/, " "); # replace each tab with 4 spaces gsub(/\"/, "\\\""); # escape quotes - gsub(/\\[[:space:]]+$/, ""); # toss empty comments + gsub(/\\[[:space:]]*$/, ""); # toss empty comments } # strip out empty lines >Release-Note: >Audit-Trail: >Unformatted: