ARM Technical Support Knowledge Articles

ARE UNIONS SUPPORTED IN C51

Applies to: C51 C Compiler

Answer

Information in this article applies to:


SYMPTOMS

I can find no reference in the compiler manual as to whether or not union is supported by C51. I get compiler errors from a union in my code. Is this data structure supported?

CAUSE

Yes. Unions are fully supported in the C51 compiler.

RESOLUTION

There must be some kind of syntactical problem in the code. Please refer to a C reference manual and try an example from one of them.

MORE INFORMATION

Consult "The C Programming Language" by Brian Kernighan and Dennis Ritchie or "C and the 8051" by Tom Schulz.

Article last edited on: 2005-08-03 12:37:42

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