How does gcc order bitfields on a little-endian machine? Is the first entry the most significant bit or what?

>Is the first entry the most significant bit or what?
IIRC, it's or what.

>bump
Don't bump your threads, it's rude. I mean really, is 30 minutes really that long to wait? It's not like Daniweb is a real-time chat with paid people helping 24/7 or anything.

As for the question?

>As for the question?
Sorry, I guess my joke was too subtle. The answer is "or what". IIRC, when you have the following in gcc, a is the least significant bit:

struct foo {
  unsigned int a:1;
  unsigned int b:1;
};

How does gcc order bitfields on a little-endian machine? Is the first entry the most significant bit or what?

endianness referrs to byte ordering, not bits. bit ordering is always the same. endianness describes the direction that bytes are stored in increasing memory locations. big-endian means "big end first". little-endian means "little end first"

but really, it all comes down to the fact that the Blefuscudians are stupid fools who ruin perfectly good soft-boiled eggs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.