Messages in this thread | | | Subject | Re: Is the kernel compiler gcc by definition? | From | Andi Kleen <> | Date | 16 Oct 1998 23:10:35 +0200 |
| |
In article <vyz1zo8ydne.fsf@issan.cs.uni-dortmund.de>, Andreas Schwab <schwab@LS5.informatik.uni-dortmund.de> writes: > RHS Linux User <humbubba@raptor.cqi.com> writes: > |> Is there a policy on what C constructs may be in the kernel? > |> Or is gcc the de-facto definition of what kind of code is allowed? > |> Or something else? > |> Does anything in the normal arguments to gcc preclude the use of gcc's > |> labels-as-values? ( computed gotos). > |> > |> I did a quick grep for goto * and got no hits.
> For most cases switch is good enough.
And computed goto turns off lots of useful optimizations in the compiler, so it is probably not a good idea.
BTW The Linux kernel uses a feature related to computed gotos: label addresses. They are useful to print the %eip/%pc in panic messages (e.g. used in include/linux/skbuff.h)
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |