Keil™, An ARM® Company

Technical Support

C51: ARE UNIONS SUPPORTED IN C51

Information in this article applies to:

  • C166 Version 3.12
  • C166 Version 4.01
  • C251 Version 2.14
  • C51 Version 5.50

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.

Last Reviewed: Wednesday, August 03, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure