Quackker12 said:
I have Turbo C 2.0, and in layer3.c, a variable called mantisa is
defined as:
unsigned long mantisa: 27;
The compiler says that the bit width is too large. How do I fix the
code so I can compile it?
Others have mentioned that this syntax makes sense only
if `mantisa' is an element of a struct or union. There's no
hope of getting this to do anything sensible if `mantisa' is
a free-standing variable.
If `mantisa' *is* a struct or union element, the only
valid "base" types are the various flavors of `int' (and,
in the latest "C99" Standard, `_Bool'). A compiler is
allowed to accept `long' as the base type, but is not
required to do so.
Finally, the compiler is not required to accept a bit
count wider than the compiler's notion of `int'. Even if
the compiler supports a 32-bit `long' -- or a 64-bit `long'
or a 128-bit `long' -- it need not accept anything wider
than `int' as a bit field width.
Summary: There might not be anything you can do about
the problem, short of finding a different compiler.