1 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | FileCheck -check-prefix=CHECK-C %s
2 // RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | FileCheck -check-prefix=CHECK-CXX %s
4 // CHECK-CXX: ret i32 7
6 // This test case illustrates a peculiarity of the promotion of
7 // enumeration types in C and C++. In particular, the enumeration type
8 // "z" below promotes to an unsigned int in C but int in C++.
9 static enum { foo
, bar
= 1U } z
;