Bit field width restriction to 32 bits

According to the PGI user guide, there is a restriction on the width of bitfields in structures to 32 bits. I am porting a code that frequently uses fields wider than this with a container class of ‘long’ or ‘long long’ to achieve a potential width of 64 bits. This is an important performance/storage issue for this code. I’m curious why this restriction is present as it does not appear in other compilers I’m familiar with.


Hi Chris,

The other compilers have added a language extension to allow for ‘wide’ bit-fields. While we are considering adding this extension in a future release, we currently only use the ANSI C standard definition which states that bit-fields must be an int or bool.