Re: kernel programming questions

Tim Hollebeek (tim@franck.Princeton.EDU)
Tue, 1 Jul 1997 08:49:47 -0400 (EDT)


Richard B. Johnson writes ...
>
> On Mon, 30 Jun 1997, Michael Bruck wrote:
>
> > Ok, two short questions:
> >
> > Is there a arch-independant type available for the
> > save_flags macro ? (flags_t ??)
> >
> > Is there a problem that could prevent one from using memory
> > alloc'd from stack in the kernel like
> >
> > int foo(int bar)
> > {
> > int foo_bar[bar];
> > ...
> > }
>
> Even though that works.... There SHOULD be a problem with it! Don't
> write code like that. For some reason gcc lets you get away with it.
> If you must write code like that it's broken from the start. Automatic
> variables are supposed to be automatic, not dynamic.

First of all, the point that only gcc supports it isn't that important
since Linux already uses a _ton_ of gcc-isms. Second, C9X will add
support for the above to the official C language, so it isn't that evil.

---------------------------------------------------------------------------
Tim Hollebeek | Disclaimer :=> Everything above is a true statement,
Electron Psychologist | for sufficiently false values of true.
Princeton University | email: tim@wfn-shop.princeton.edu
----------------------| http://wfn-shop.princeton.edu/~tim (NEW! IMPROVED!)

spamming idiots please email spam@franck.princeton.edu so I know who you are.
Thanks for being stupid and doing this automatically.