2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / ext / oper1.C
blob7f97d73a8f5710a52e8b2a1fed0aa60d1d07d014
1 // { dg-do run }
3 // Copyright 2002 Free Software Foundation
4 // Contributed by Jason Merrill <jason@redhat.com>
6 // Make sure the GNU extension of accepting dropping cv-qualifiers for
7 // the implicit this argument does not kick in when taking the address
8 // of an object, since this extension would change the meaning of a
9 // well-defined program.
11 struct A {
12   A* operator&() { return 0; }
15 int main ()
17   const A a = {};
18   return (&a == 0);