[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / scoping15.C
blob69207e9334b22d1f87ddda9a04cd8d0022d3fdf0
1 // { dg-do assemble  }
2 // { dg-options "-ffriend-injection" }
3 // Bug: g++ ignores the :: qualification and dies trying to treat an integer
4 // variable as a list of functions.
6 class DComplex;
7 double imag (const DComplex&);
9 class DComplex {
10 public:
11   friend  double   imag(const DComplex& a); // Not injected, no warning
14 class FComplex {
15 public:
16   friend  float    imag(const FComplex& a); // { dg-warning "is visible"
19 void
20 scnrm2(FComplex cx[])
22   int imag;
23   ::imag( cx[0] );
25 // { dg-warning "ffriend-injection.* is deprecated" "" { target *-*-* } cc1plus: }