2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / enum3.C
blob04e8f287bc7e9615482116584b9bc97ea0985bee
1 // { dg-do assemble  }
2 // { dg-options "-Wall" }
4 enum tristate { no = -1, maybe, yes };
6 tristate
7 tristate_satisfies (register tristate const t1, register tristate const t2)
9   switch (t1)
10     {
11     case no:
12       return (tristate) -t2;
13     case maybe:
14       return yes;
15     case yes:
16       return t2;
17     }
18   return maybe;