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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [16077.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// 981203 bkoz
// g++/16077
// { dg-options "-Wconversion" }

class nicaragua;
struct colombia {
   colombia();
   colombia(const colombia &);
   colombia(const nicaragua &);
   colombia &operator= (const colombia&);
};

struct nicaragua {
public:
   nicaragua();
   nicaragua(const nicaragua&);
   operator colombia();
};

void peace(const colombia&);

void foo(nicaragua& b) {
  peace(b); // { dg-warning "choosing 'nicaragua::operator" "nic" }
  // { dg-warning "conversion" "conv" { target *-*-* } 24 }
  // { dg-message "note" "note" { target *-*-* } 24 }
}




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.