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/SemaCXX/enum.cpp | |
parent | 998bc5802ecdd65ce3b270f6c69a8ae8557f0a10 (diff) |
Notes
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r-- | test/SemaCXX/enum.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp index 1dc55e39162bd..b4a050cb0908e 100644 --- a/test/SemaCXX/enum.cpp +++ b/test/SemaCXX/enum.cpp @@ -90,3 +90,8 @@ typedef enum { }; // expected-warning{{typedef requires a name}} enum PR7921E { PR7921V = (PR7921E)(123) // expected-error {{expression is not an integer constant expression}} }; + +void PR8089() { + enum E; // expected-error{{ISO C++ forbids forward references to 'enum' types}} + int a = (E)3; // expected-error{{cannot initialize a variable of type 'int' with an rvalue of type 'E'}} +} |