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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr127.C] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do link }
2
// Origin: Giovanni Bajo 
3
// DR127: Ambiguity in description of matching deallocation function
4
 
5
#include 
6
#include 
7
 
8
struct A
9
{
10
  // placement new, but can be called through normal new syntax.
11
  void* operator new(std::size_t size, float = 0.0f)
12
  {
13
    return ::operator new(size);
14
  }
15
 
16
  // The matching deallocation function must be called, which means
17
  //  the placemente delete.
18
  void operator delete(void*);
19
  void operator delete(void*, float) {}
20
 
21
  A()
22
  { throw 5; }
23
};
24
 
25
int main()
26
{
27
  (void)new A;
28
}

powered by: WebSVN 2.1.0

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