[lkml]   [2000]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: non-gcc linux? (was Re: Where did kgcc go in 2.4.0-test10?) (Christoph Hellwig)  wrote on 02.11.00 in <>:

> In article <> you wrote:
> > As is being discussed here, C99 has some replacements to the gcc syntax
> > the kernel uses. I believe the C99 syntax will win in the near future,
> > and thus the gcc syntax will have to be removed at some point. In the
> > interim the kernel will either move towards supporting both, or a
> > quantum jump to support the new gcc3+ compiler only. I am hoping a
> > little thought can get put into this such that this change will be less
> > painful down the road.
> BTW: the C99 syntax for named structure initializers is supported from
> gcc 2.7.<something> on. But a policy decision has been take to use
> gcc synta in kernel.

Just so everyone knows what we're talking about, some examples from C99:

33 EXAMPLE 9 Arrays can be initialized to correspond to the elements of an
enumeration by using designators:

enum { member_one, member_two };
const char *nm[] = {
[member_two] = "member two",
[member_one] = "member one",

34 EXAMPLE 10 Structure members can be initialized to nonzero values
without depending on their order:

div_t answer = {
.quot = 2,
.rem = -1

35 EXAMPLE 11 Designators can be used to provide explicit initialization
when unadorned initializer lists might be misunderstood:

struct { int a[3], b; }
w[] = {
[0].a = {1},
[1].a[0] = 2

MfG Kai
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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