switch 屬性
switch關鍵字會選取encapsulated_union的辨別。
switch (switch-type switch-name)
typedef union _S1_TYPE switch (long l1) U1_TYPE
{
case 1024:
float f1;
case 2048:
double d2;
} S1_TYPE;
/* in generated header file */
typedef struct _S1_TYPE
{
long l1;
union
{
float f1;
double d2;
} U1_TYPE;
} S1_TYPE;