On Tue, 16 Sep 2003, Randy.Dunlap wrote:

> On Tue, 16 Sep 2003 17:31:21 -0700 David Brownell <[EMAIL PROTECTED]> wrote:
> 
> | But I've got a couple questions about this one, maybe you know the
> | answers to them:
> | 
> | > - unsigned                no_interrupt : 1,
> | > -                         zero : 1,
> | > -                         short_not_ok : 1;
> | > + unsigned                no_interrupt:1,
> | > +                         zero:1,
> | > +                         short_not_ok:1;
> | 
> | I tried this and it made "no_interrupt" appear in the kerneldoc.
> | But NOT the other two bits.  Is someone fixing kerneldoc bugs,
> | so that issue can have some useful resolution?
> 
> Oh, bad.  Sorry about that.  Not that I know of.
> 
> | Related question, I'm guessing that having each one on a line
> | by itself would make kerneldoc happy.  But as I recall, that'd
> | be at the cost of making the bits live in separate words, which
> | is waste I'd rather avoid ... know if that's true?
> 
> Yes, if I recall correctly, that would allocate a new <unsigned>
> for each one instead of a series of bits in one <unsigned>....

It may depend on the particular compiler you use.  I just tried the 
experiment using gcc 2.96 from RedHat 7.2 on a Pentium-class machine.  
Given the following structure definition:

struct s {
        unsigned i:1, j:1;
        unsigned k:1;
        unsigned h:1;
};

and invoked with -O -S the compiler placed all four bits in the same byte
(determined by reading the assembler-code output).  It did the same when 
invoked with -O2 -S although the code generated was different.

Alan Stern



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to