Subject: bin/5767: cc gives obtuse error message for '-D' options that begin with digits.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@most.weird.com>
List: netbsd-bugs
Date: 07/15/1998 22:27:40
>Number: 5767
>Category: bin
>Synopsis: cc gives obtuse error message for '-D' options that begin with digits.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 15 19:35:01 1998
>Last-Modified:
>Originator: Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release: NetBSD-1.3.1
>Environment:
System: NetBSD most 1.3.1 NetBSD 1.3.1 (MOST) #0: Mon May 25 01:21:22 EDT 1998 woods@most:/usr/src-1.3.1/sys/arch/sparc/compile/MOST sparc
>Description:
It would appear as if there's an options parsing bug in CC.
Attempts to set a manifest constant using the '-D' option fail
if the option begins with a digit, but in the most obtuse way.
>How-To-Repeat:
by observation:
23:08 [852] $ cc -D44bsd hello.c
hello.c:0: malformed option `-D 44bsd'
>Fix:
Since it's illegal for a preprocessor macro to start with a
digit the CC option parser should detect this an report it with
a meaningful error message.
>Audit-Trail:
>Unformatted: