diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 00:40:41 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 00:40:41 +0000 |
commit | f6ff45b5b0d670379779a72fe907f5147c2459bb (patch) | |
tree | b1540de4319151105aaad777b387219ef01bc592 /gcc/testsuite/g++.dg/expr/cast3.C | |
parent | 521f3adaa1baeaf00caf66ecb1761b845c1bcea7 (diff) |
This commit was manufactured by cvs2svn to create tagbje-unsw-branchpoint
'bje-unsw-branchpoint'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/bje-unsw-branchpoint@97592 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/cast3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/expr/cast3.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/expr/cast3.C b/gcc/testsuite/g++.dg/expr/cast3.C new file mode 100644 index 00000000000..2ca56c2698a --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/cast3.C @@ -0,0 +1,22 @@ +// { dg-do compile } + +enum MyState +{ + QUIT = 0, + START, + STOP, + PAUSE +}; + +double GetDouble() +{ + return 1.0; +} + +int main() +{ + MyState the_state; + + the_state = (MyState)GetDouble(); // { dg-bogus "invalid cast" } + return 0; +} |