uninit-5.c
来自「this is a gcc file, you can download it 」· C语言 代码 · 共 41 行
C
41 行
/* Spurious uninitialized-variable warnings. These cases are documented as not working in the gcc manual. *//* { dg-do compile } *//* { dg-options "-O -Wuninitialized" } */extern void use(int);extern void foo(void);voidfunc1(int cond){ int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */ if(cond) x = 1; foo(); if(cond) use(x);}voidfunc2 (int cond){ int x; /* { dg-bogus "x" "uninitialized variable warning" { xfail *-*-* } } */ int flag = 0; if(cond) { x = 1; flag = 1; } foo(); if(flag) use(x);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?