[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: [KJ] [PATCH] dm: uninitialize static variables
- From: Alexey Dobriyan <adobriyan gmail com>
- To: Nicolas Kaiser <nikai nikai net>
- Cc: "Carlos Manuel Duclos Vergara"carlos embedded cl, dm-devel redhat com, kernel-janitors lists osdl org
- Subject: [dm-devel] Re: [KJ] [PATCH] dm: uninitialize static variables
- Date: Sat, 10 Dec 2005 18:35:59 +0300
On Mon, Dec 05, 2005 at 07:00:29PM +0100, Nicolas Kaiser wrote:
> * "Carlos Manuel Duclos Vergara" <carlos embedded cl>:
> > > uninitialize static variables initialized to 0, to make them go
> > > to .bss instead of .data.
> > >
> >
> > if you want that why not explicitely put them in .bss?
> > something like:
> >
> > > -static unsigned int major = 0;
> > > +static unsigned int major; /* = 0 */
> >
> > static unsigned int major = 0 __attribute__ ((section(".bss"));
>
> I personally like the idea of explicitly expressing this intention,
> but I didn't manage to achieve this together with initialization.
Not only you use gcc'ism, you also make code needlessly verbose.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]