develooper Front page | perl.perl5.porters | Postings from October 2005

Missing defaults in switches

Thread Next
From:
Andy Lester
Date:
October 30, 2005 21:55
Subject:
Missing defaults in switches
Message ID:
20051031055501.GB10767@petdance.com
I've been playing with GCC switches some more.  There's a switch that
finds switch() statements w/o default cases.  There are plenty.

Do we care?  Seems to me that a

    default:
        assert(0);
        break;

at the bottom of each of these switch() statements might be a good thing
to have.

Thoughts?

xoxo,
Andy

-- 
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About