c99-fordecl-3.c
来自「linux下编程用 编译软件」· C语言 代码 · 共 16 行
C
16 行
/* Test for C99 declarations in for loops. Test constraints: struct and union tags can't be declared there (affirmed in response to DR#277). *//* Origin: Joseph Myers <joseph@codesourcery.com> *//* { dg-do compile } *//* { dg-options "-std=iso9899:1999 -pedantic-errors" } */voidfoo (void){ for (struct s { int p; } *p = 0; ;) /* { dg-error "error: 'struct s' declared in 'for' loop initial declaration" } */ ; for (union u { int p; } *p = 0; ;) /* { dg-error "error: 'union u' declared in 'for' loop initial declaration" } */ ;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?