• Array initialization inside struct
    Hello, I try compile this code (.c) with --c99 option struct sx { char c; char a[]; }; static struct sx xx = { 1, {[5] = 0} }; and have error error: #146: too many initializer values How...
  • Anonymous union inside a struct?
    The C complier doesn't like this piece of source code: ------------------------- struct MyUart { union { unsigned char rx; // read unsigned char tx; // write }; unsigned char control; // r...
  • unnamed variable as place holder inside struct
    Does any one know how to create an unnamed variable for place holder in a struct? I know you can do it in bitfiled. Example: struct S { int a; int b; int[5]; //reserved 5 ints but dont' need...
  • array inside interrupt function
    I having trouble sending data out under interrupts from a buffer. The buffer was declared in xdata and i have a counter that is used to index into it. So when an interrupt occurs, the data is loaded...
  • Structures inside a union
    I did read some threads on the forum but could not solve my problem. I want to make a union of to data sets (a structure and an array). My code is as follows: #define COMMS_BUFFER_SIZE 80...