NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/49097: make silently accepts tokens after .else



>Number:         49097
>Category:       bin
>Synopsis:       make silently accepts tokens after .else
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 11 05:00:00 +0000 2014
>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:



Home | Main Index | Thread Index | Old Index