Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wenum-compare-no-2.C
blobfa7dda88a3ebb5c0cf5d7c717b94c911eb04fb0e
1 // PR c++/53524
2 // { dg-options "-Wno-enum-compare" }
4 template < typename > struct PointerLikeTypeTraits {
5   enum { NumLowBitsAvailable };
6 };
8 class CodeGenInstruction;
9 class CodeGenInstAlias;
11 template < typename T>
12 struct PointerIntPair {
13   enum { IntShift = T::NumLowBitsAvailable };
16 template < typename PT1, typename PT2 > struct PointerUnionUIntTraits {
17   enum {
18     PT1BitsAv = PointerLikeTypeTraits < PT1 >::NumLowBitsAvailable,
19     PT2BitsAv = PointerLikeTypeTraits < PT2 >::NumLowBitsAvailable,
20     NumLowBitsAvailable = 0 ? PT1BitsAv : PT2BitsAv
21   };
24 template < typename PT1, typename PT2 > class PointerUnion {
25   typedef PointerIntPair < PointerUnionUIntTraits < PT1, PT2 > > ValTy;
26   ValTy Val;
29 struct ClassInfo {
30   PointerUnion < CodeGenInstruction *, CodeGenInstAlias * > DefRec;