a GCC question
David Edelsohn
dje at watson.ibm.com
Sun Aug 6 14:57:43 EST 2000
>>>>> Takashi Oe writes:
>> Even if the default is to do nothing, one always should provide a
>> default action or just break so that the density / coverage of the switch
>> statement cases is apparent.
Takashi> I don't know what the density is, but, if having a default action for
Takashi> nothing is always prefered, I'll fix it (or rather I'll ask Ben to fix
Takashi> it.) Is it in gcc documentation or C standard somewhere?
It's not in the documentation or in the standard. It is good, but
not a requirements. It helps document that the programmer knows what is
expected and sometimes helps the compiler generate better code by knowing
what cases need be considered.
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list