This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [c++] switch ( enum ) vs. default statment.
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Ralf Baechle <ralf at linux-mips dot org>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Manuel López-Ibáñez <lopezibanez at gmail dot com>, PaweÅ Sikora <pluto at agmk dot net>, Mark Mitchell <mark at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 6 Feb 2007 12:05:50 -0800
- Subject: Re: [c++] switch ( enum ) vs. default statment.
- References: <45BDC001.8000801@agmk.net> <6c33472e0701290306j66b7decfxfdc7910570ff3018@mail.gmail.com> <orodo7m8gt.fsf@free.oliva.athome.lsd.ic.unicamp.br> <20070206200029.GA20355@linux-mips.org>
On Tue, Feb 06, 2007 at 08:00:29PM +0000, Ralf Baechle wrote:
> On Tue, Feb 06, 2007 at 04:44:50PM -0200, Alexandre Oliva wrote:
> > Meanwhile, there's __builtin_trap() already, and Ralf might use that
> > even to remove the asm volatile, and PaweÅ could use it in a default:
> > label. It's still worse than a __builtin_assume(e == X || e == Y),
> > but it's probably much simpler to implement. But then,
> > __builtin_unreachable() might very well be implemented as
> > __builtin_assume(0).
>
> The Linux/MIPS BUG() macro uses a break 512 instruction while
> __builtin_trap() generates a plain break that is break 0 instruction.
> Aside of that __builtin_trap() would be fine ...
__builtin_break_512() ?