initialize for union of structure failed

  • Follow


version is 3.8 with compiled time : Dec 2 2008

union u
{
  int i;
  char p;
};

struct ss
{
  union u u;
  int i;
};

struct ss s = { {0}, 10 };

in wedit:
first time compile: compiler error in defconst--Constant not
recognized of type union u
second time press F9, error disappeared.

code:
struct { int a[3], b; } w[] = { [0].a = {1}, [1].a[0] = 2 };

result is:
Missing '=' in expression
illegal expression
syntax error; found `1' expecting '}'
skipping `1' `]' `.' `a' `[' `0' `]' `=' ... up to `}'
0
Reply DarkSpy 1/1/2009 5:09:37 AM


0 Replies
345 Views

(page loaded in 0.246 seconds)

Similiar Articles:













7/24/2012 3:45:35 AM


Reply: