Subject: bin/21135: make silently ignores duplicate else
To: None <gnats-bugs@gnats.netbsd.org>
From: None <grant@netbsd.org>
List: netbsd-bugs
Date: 04/14/2003 10:13:15
>Number:         21135
>Category:       bin
>Synopsis:       make silently ignores duplicate else
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 13 17:14:00 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     grant beattie
>Release:        NetBSD 1.6Q
>Organization:
>Environment:
System: NetBSD mofo 1.6Q NetBSD 1.6Q (MOFO) #0: Wed Mar 26 23:26:52 EST 2003 grant@mofo:/usr/src/sys/arch/i386/compile/MOFO i386
Architecture: i386
Machine: i386
>Description:
make silently ignores additional else statements in a conditional.

this causes real confusion when debugging a block such as (highly
simplified) :)

.if defined(stuff)
...
.else
...
.else
# not reached
...
.elif
# not reached
...
.endif

the 2nd else is useless and should at least generate a warning.

the elif should cause an open conditional error.

>How-To-Repeat:
watch make happily parse the above without warning.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: