This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

other/1502: Nonexistent -W options not diagnosed



>Number:         1502
>Category:       other
>Synopsis:       Nonexistent -W options not diagnosed
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 22 12:46:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Myers
>Release:        2.97 20001222 (experimental)
>Organization:
none
>Environment:
System: Linux decomino 2.2.18 #1 Thu Dec 14 19:30:45 UTC 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-cvs/configure --prefix=/opt/gcc/snapshot --disable-shared --enable-threads=posix --with-system-zlib
>Description:

GCC, for both C and C++, fails to give any diagnostic when a
non-existent -W option is used.

GCC 2.95.2 gave proper diagnostics for such nonsense options.

>How-To-Repeat:

gcc -c -Wnonexistent-option t.c
gcc -c -Wnonexistent-option t.C

(for any t.c, t.C, e.g. empty).

>Fix:

I suspect cpp_handle_option is to blame for returning 1 here for any
option starting -W, whether recognised or not.  This makes
c_decode_option / lang_decode_option return 1 even if they didn't
understand and consume any arguments.
>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]