diff options
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 1dc55e3..b4a050c 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'}} +} |