view gcc/testsuite/g++.dg/diagnostic/friend2.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// PR c++/61490
// { dg-do compile }

namespace N { void f (); }
void f2 ();

struct A {
  friend void N::f () { } // { dg-error "15:friend function definition 'f' cannot have a name qualified with 'N::'" }
  friend void ::f2 () { } // { dg-error "15:friend function definition 'f2' cannot have a name qualified with '::'" }
};