Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/gcc/testsuite/gcc.dg/Wunused-var-6.c
2023-03-06 14:48:14 +01:00

14 lines
313 B
C

/* PR c/99588 */
/* { dg-do compile } */
/* { dg-options "-std=c11 -Wunused-but-set-variable" } */
void bar (int, ...);
struct S { int a, b, c; };
typedef _Atomic struct S T;
void
foo (void)
{
static T x = (struct S) { 0, 0, 0 }; /* { dg-bogus "set but not used" } */
bar (0, x = (struct S) { 1, 1, 1 });
}