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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// GROUPS passed overloading
  typedef void *                (*NewObject) (void);
  
  class B
  {
  public:
        static void WantsNew (NewObject creator); // { dg-message "B::WantsNew|no known conversion" }
  };
  
  class A
  {
  public:
      static A * NewOne (void);
  
      static void InitClass (void)
      {
          B::WantsNew ( (NewObject) A::NewOne );
          // This used to die in convert_harshness_{ansi,old} cuz it
          // didn't know what to do about a void type.
          B::WantsNew ( A::NewOne );// { dg-error "no matching" } 
          // { dg-message "candidate" "candidate note" { target *-*-* } 21 }
      }
  };

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.