Messages in this thread |  | | | Date | Mon, 26 Jan 1998 02:07:10 +0100 (CET) | | From | Regis Duchesne <> | | Subject | Re: kernel and egcs |
| |
> In this case I would just accommodate the compiler: > > /* include/asm-i386/string.h */ > switch (n % 4) { > case 0: COMMON(""); break; > case 1: COMMON("\n\tmovsb"); break; > case 2: COMMON("\n\tmovsw"); break; > case 3: COMMON("\n\tmovsw\n\tmovsb"); break; > } > return to; It is slower : it adds one unuseful jump compared to the original code That's why the best solution is to keep all returns were they are, to add one return at the end, and to comment it with something like :
/* Never reached. Needed to avoid a stupid gcc warning */ Regards,
Regis "HPReg" Duchesne - Engineering Student at ***** ******** ***** www http://www.via.ecp.fr/~regis/ (O o) I use Linux & 3Com (1135 KB/s over 10Mb/s ethernet) --.oOO--(_)--OOo.-----------------------------------------------------------
|  |