// { dg-do compile } // { dg-options "-ftemplate-depth-15" } template struct Factorial { enum { nValue = nFactor * Factorial::nValue }; // { dg-error "depth exceeds maximum" } // { dg-message "recursively required" "" { target *-*-* } 6 } // { dg-error "incomplete type" "" { target *-*-* } 6 } } // { dg-error "expected ';' after" } template<> struct Factorial<0> { enum { nValue = 1 }; }; static const unsigned int FACTOR = 20; int main() { Factorial::nValue; return 0; }