lkml.org 
[lkml]   [1998]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Is the kernel compiler gcc by definition?
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.119 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site