]>
gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.dg/uninit-2.c
1 /* Spurious uninitialized variable warnings, case 2.
2 Taken from cpphash.c (macroexpand) */
3 /* { dg-do compile } */
4 /* { dg-options "-O -Wuninitialized" } */
16 CPP_EOF
, CPP_POP
, CPP_COMMA
, CPP_RPAREN
19 extern enum cpp_token
macarg (struct cpp_reader
*, int);
22 macroexpand (struct cpp_reader
*pfile
, struct definition
*defn
)
24 int nargs
= defn
->nargs
;
28 enum cpp_token token
; /* { dg-bogus "token" "uninitialized variable warning" { xfail *-*-* } } */
36 if (i
< nargs
|| (nargs
== 0 && i
== 0))
38 /* if we are working on last arg which absorbs rest of args... */
39 if (i
== nargs
- 1 && defn
->rest_args
)
41 token
= macarg (pfile
, rest_args
);
44 token
= macarg (pfile
, 0);
45 if (token
== CPP_EOF
|| token
== CPP_POP
)
50 while (token
== CPP_COMMA
);
This page took 0.03673 seconds and 5 git commands to generate.