This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: switches with no default case
- To: fjh at cs dot mu dot oz dot au
- Subject: Re: switches with no default case
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Wed, 3 Jan 01 11:21:47 EST
- Cc: gcc at gcc dot gnu dot org
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.