Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / C / drs / dr338.c
blob60e1c1e257c97fc53c09d48f744af400fa4c771d
1 /* RUN: %clang_cc1 -std=c89 -fsyntax-only -Wuninitialized -verify %s
2 RUN: %clang_cc1 -std=c99 -fsyntax-only -Wuninitialized -verify %s
3 RUN: %clang_cc1 -std=c11 -fsyntax-only -Wuninitialized -verify %s
4 RUN: %clang_cc1 -std=c17 -fsyntax-only -Wuninitialized -verify %s
5 RUN: %clang_cc1 -std=c2x -fsyntax-only -Wuninitialized -verify %s
6 */
8 /* WG14 DR338: yes
9 * C99 seems to exclude indeterminate value from being an uninitialized register
11 * Note, because we're relying on -Wuninitialized, this test has to live in its
12 * own file. That analysis will not run if the file has other errors in it.
14 int dr338(void) {
15 unsigned char uc; /* expected-note {{initialize the variable 'uc' to silence this warning}} */
16 return uc + 1 >= 0; /* expected-warning {{variable 'uc' is uninitialized when used here}} */