NetBSD Problem Report #49097
From dholland@netbsd.org Mon Aug 11 04:58:20 2014
Return-Path: <dholland@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id F1DC1ACA2A
for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Aug 2014 04:58:19 +0000 (UTC)
Message-Id: <20140811045819.8471514A69B@mail.netbsd.org>
Date: Mon, 11 Aug 2014 04:58:19 +0000 (UTC)
From: dholland@netbsd.org
Reply-To: dholland@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: make silently accepts tokens after .else
X-Send-Pr-Version: 3.95
>Number: 49097
>Category: bin
>Synopsis: make silently accepts tokens after .else
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 11 05:00:00 +0000 2014
>Closed-Date: Thu Jan 07 11:19:38 +0000 2021
>Last-Modified: Thu Jan 07 11:19:38 +0000 2021
>Originator: David A. Holland
>Release: NetBSD 6.99.49 (20140811)
>Organization:
>Environment:
System: NetBSD valkyrie 6.99.28 NetBSD 6.99.28 (VALKYRIE) #14: Tue Dec 10 15:15:49 EST 2013 dholland@valkyrie:/usr/src/sys/arch/amd64/compile/VALKYRIE amd64
Architecture: x86_64
Machine: amd64
>Description:
Make silently accepts and ignores arbitrary tokens after .else. This is
weird but harmless in some cases, e.g.:
foo:
.if ${FOO} == "foo"
echo yes
.else guess not
echo no
.endif
but becomes a serious problem if one accidentally writes ".else if":
foo:
.if ${FOO} == "foo"
echo yes
.else if ${FOO} == "bar"
echo no
.endif
because this *looks* valid, it just silently doesn't do what one
expected.
Noted (and tripped on) by riastradh.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 07 Jan 2021 11:19:38 +0000
State-Changed-Why:
I believe rillig fixed this.
line 4: The .else directive does not take arguments.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.