1 // { dg-do compile } 2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> 3 // Make sure the error about '<:' can be turned into a warning 4 // { dg-options "-fpermissive -fshow-column" } 5 6 struct B; 7 8 template <class A> 9 struct Foo {}; 10 11 Foo<::B> foo; // { dg-bogus "error" "error in place of warning" { target { ! c++11 } } } 12 // { dg-warning "4: '<::' cannot begin a template-argument list" "warning <::" { target { ! c++11 } } .-1 } 13 // { dg-message "4:'<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target { ! c++11 } } .-2 } 14