namespace a {
    namespace b {
        void foo();
    }
}

void
a::b:foo() // { dg-error "" }
{
}


syntax highlighted by Code2HTML, v. 0.9.1