-Wswitch-default -Wswitch-enum ...

Andrew Cagney ac131313@redhat.com
Sun Jan 13 06:48:00 GMT 2002


Hello,

(as already reported -Wswitch is broken)

Attached is a work-in-progress patch for adding options:

-Wswitch-default
	warn when there is no ``default:'' case in the switch.
	Works.

-Wswitch-enum
	warn when there is a missing enum case, regardless of
	the presence or otherwise of a default clause.
	Broken by existing -Wswitch I think.

If these are basicly ok, I'll come up with proper patches (tweeking the 
doco takes a while).

Now, about -Wswitch-fallthrough (warn of fallthrough switches) .... :-)


Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20020113/c08182ca/attachment.ksh>


More information about the Gcc mailing list