summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/suggestions1.C
blob: 1185d58416a0362c6db29b9e98311ce453d348c1 (plain)
1
2
3
4
5
6
7
8
// { dg-do compile }

namespace N { namespace M { int foo; } } // { dg-message "N::M::foo" }
int f (void) { return N::foo; }		 // { dg-error "not a member" }
// { dg-message "suggested alternative" "missing namespace" { target *-*-* } 4 }

int g (void) { return ::foo; }	// { dg-error "not been declared" }
// { dg-message "suggested alternative" "omitted namespace" { target *-*-* } 7 }