📄 union-cast-2.c
字号:
/* { dg-do compile } *//* { dg-options "-std=c89 -pedantic-errors" } *//* PR 23155 We should get two error messages, one about union cast and the other about array access for non lvalues. */union vx {short f[8]; int v;};int vec;voidfoo5 (int vec){ ((union vx) vec).f[5] = 1; /* { dg-error "(forbids subscripting)|(forbids casts to union type)" } */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -