2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / operators18.C
blobd362a4c9f755a5264cc21ec202d21ed2073be927
1 // { dg-do assemble  }
2 // GROUPS passed operators
3 // opr-ampr file
4 // From: mecklen@oops.cs.utah.edu (Robert Mecklenburg)
5 // Date:     Thu, 8 Oct 92 16:33:08 -0600
6 // Subject:  Type conversion and overloading bugs in 2.2.2
7 // Message-ID: <9210082233.AA28203@hellgate.utah.edu>
9         enum E { a, b, c };
10         struct Estr {
11             E value;
12             Estr()                              {}
13             Estr( int i ) : value( (E)i )       {}
14             operator E()                        { return value; }
15         };
16         extern Estr baz();
17         int bazz() { return baz() & 2; }