[ILUG] bitfields correction

From: Shane Dempsey (sdempsey at domain tssg.wit.ie)
Date: Fri 26 May 2000 - 13:29:04 IST


Hi all,
A few weeks ago I made the point that you couldn't use
bitfields in Visual C++. This related to someone's comments
about bitfields being used in the Linux Kernel.

This is totally incorrect. The following is totally legal under
VC++ and I'm using it at the moment

unsigned int my3bitInt : 3; // 0 to 7

Bitfields are standard C but the ordering of bits in bit fields is compiler
specific
In VC++ it seems to be from low to high bit.

I stand corrected.

    ...shane

--
######################################
Shane Dempsey -         sdempsey at domain tssg.wit.ie
TSSG Researcher -      http://www-tssg.wit.ie
( 0x2b | -0x2b == 0xff ) ? printf("that is the question);
#######################################


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:16 GMT