ARM Technical Support Knowledge Articles

SIGNED BIT FIELD NOT SUPPORTED

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I have problems using signed bit fields. Are signed bit fields not supported by Keil C51?

ANSWER

Per ANSI standard, the behavior on bit fields is implementation specific. In Keil C51, bit fields are always unsigned. There is no way to define signed bit fields.

Bit fields are inefficient on an 8051. With an 8051, you should use bdata addressable objects.

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-08-30 14:56:33

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential