Re: kernel and egcs

Regis Duchesne (regis@via.ecp.fr)
Tue, 27 Jan 1998 01:05:49 +0100 (CET)


> Maybe returns should not be put there? I'm afraid that gcc will
> generate some code there, and that return will make it only generate
> more unneeded code, thus bloating the kernel. I do not like idea of
> code being bigger just because some stupid warnings.
Michael Galbraith suggested to use :

{
...
switch(foo % 4){
case 0:
func1();
goto end;
case 1:
func2();
goto end;
...
}

end:
return value;
}

It is not that ugly (such constructions are common in kernel sources)
and is optimized by gcc : a return is appended in lieu of the jump.

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.-----------------------------------------------------------