OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [arg11.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// GROUPS passed arg-matching
// GROUPS passed arg-matching
// From: gustavo@cpqd.br (Gustavo Chaves)
// From: gustavo@cpqd.br (Gustavo Chaves)
// Date:     Wed, 25 May 94 09:38:00 EST
// Date:     Wed, 25 May 94 09:38:00 EST
// Subject:  problem with user defined conversions in initialization
// Subject:  problem with user defined conversions in initialization
// Message-ID: <9405251238.AA19815@moon.cpqd.br>
// Message-ID: <9405251238.AA19815@moon.cpqd.br>
struct String { String(const char*); };
struct String { String(const char*); };
struct Ack { Ack(String); };
struct Ack { Ack(String); };
struct S { void method(Ack); }; // { dg-message "candidate is" } referenced below
struct S { void method(Ack); }; // { dg-message "candidate is" } referenced below
void function(Ack);
void function(Ack);
int
int
foo(S *o)
foo(S *o)
{ // Neither call has a usable constructor for conversions of char[5] to Ack.
{ // Neither call has a usable constructor for conversions of char[5] to Ack.
  function("adsf");// { dg-error "conversion" }
  function("adsf");// { dg-error "conversion" }
  o->method("adsf");// { dg-error "no matching" }
  o->method("adsf");// { dg-error "no matching" }
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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