• 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...
  • Designated initializers for struct
    struct S {int a; float b; char c[4]; }; struct S s1 = {.c = "abc"}; This gives me at compiler error #29, but it should be supported in C99 right?
  • Is it possible to partially initialize a struct?
    Hi, my question is to ask whether or not it is possible to partially initialize a struct in C language with Keil C166 compiler. According to C syntax [1], it should be possible to do things like...
  • Initializing array of structs
    Hello, I have an array of structs, which I would like to initialize at startup, but to my surprise this gives me a compiler syntax error: I do as follows: typedef volatile struct Timer {...
  • const struct/unon initialization proble.
    Hi, with the following sample code... typedef __packed struct { uint8_t field_1; uint8_t field_2; uint8_t field_3; uint8_t field_4; } T_Sub; typedef __packed struct { T_Sub Sub; uint8_t...