diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | bca07a4524feb4edec581062d631a13116320a24 (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/CodeGen/enum.c | |
parent | 998bc5802ecdd65ce3b270f6c69a8ae8557f0a10 (diff) |
Notes
Diffstat (limited to 'test/CodeGen/enum.c')
-rw-r--r-- | test/CodeGen/enum.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGen/enum.c b/test/CodeGen/enum.c index 87b0e1e67144..0e239f1a8ee3 100644 --- a/test/CodeGen/enum.c +++ b/test/CodeGen/enum.c @@ -1,6 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6' // RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7' +// This test case illustrates a peculiarity of the promotion of +// enumeration types in C and C++. In particular, the enumeration type +// "z" below promotes to an unsigned int in C but int in C++. static enum { foo, bar = 1U } z; int main (void) |