Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/Wenum-compare-no-2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/53524 // { dg-options "-Wno-enum-compare" } template < typename > struct PointerLikeTypeTraits { enum { NumLowBitsAvailable }; }; class CodeGenInstruction; class CodeGenInstAlias; template < typename T> struct PointerIntPair { enum { IntShift = T::NumLowBitsAvailable }; }; template < typename PT1, typename PT2 > struct PointerUnionUIntTraits { enum { PT1BitsAv = PointerLikeTypeTraits < PT1 >::NumLowBitsAvailable, PT2BitsAv = PointerLikeTypeTraits < PT2 >::NumLowBitsAvailable, NumLowBitsAvailable = 0 ? PT1BitsAv : PT2BitsAv }; }; template < typename PT1, typename PT2 > class PointerUnion { typedef PointerIntPair < PointerUnionUIntTraits < PT1, PT2 > > ValTy; ValTy Val; }; struct ClassInfo { PointerUnion < CodeGenInstruction *, CodeGenInstAlias * > DefRec; };