📄 pointer-arith-6.c
字号:
/* Test diagnostics for sizeof on void and function types. Test with -Wpointer-arith. *//* Origin: Joseph Myers <joseph@codesourcery.com> *//* { dg-do compile } *//* { dg-options "-Wpointer-arith" } */extern const void v;void f(void);voidg (void){ sizeof (v); /* { dg-warning "invalid application of 'sizeof' to a void type" } */ sizeof (void); /* { dg-warning "invalid application of 'sizeof' to a void type" } */ sizeof (f); /* { dg-warning "invalid application of 'sizeof' to a function type" } */ sizeof (void (void)); /* { dg-warning "invalid application of 'sizeof' to a function type" } */}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -