switches with no default case

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Wed Jan 3 08:21:00 GMT 2001


    The Mercury front-end knows when a switch's cases are
    exhaustive, and so no default case is needed,
    i.e. when the default case is unreachable.

    What's the best way to inform the gcc back-end of this?

This is the case as Ada.  The simplest is to just tell GCC that one of the
cases (perhaps the last) is the default case.


More information about the Gcc mailing list