OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [oper1.C] - Rev 832

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do run }

// Copyright 2002 Free Software Foundation
// Contributed by Jason Merrill <jason@redhat.com>

// Make sure the GNU extension of accepting dropping cv-qualifiers for
// the implicit this argument does not kick in when taking the address
// of an object, since this extension would change the meaning of a
// well-defined program.

struct A {
  A* operator&() { return 0; }
};

int main ()
{
  const A a = {};
  return (&a == 0);
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.