Commit cdf508e8 by Richard Henderson Committed by Richard Henderson

* g++.old-deja/g++.other/delete6.C: Use size_t with operator new.

From-SVN: r29237
parent 638e6ebc
Thu Sep 9 10:40:36 1999 Richard Henderson <rth@cygnus.com>
* g++.old-deja/g++.other/delete6.C: Use size_t with operator new.
Thu Sep 9 12:32:57 BST 1999 Nathan Sidwell <nathan@acm.org> Thu Sep 9 12:32:57 BST 1999 Nathan Sidwell <nathan@acm.org>
* g++.old-deja/g++.other/lookup11.C: New test. * g++.old-deja/g++.other/lookup11.C: New test.
......
// Origin: Alexander Schiemann (aschiem@count.math.uni-sb.de) // Origin: Alexander Schiemann (aschiem@count.math.uni-sb.de)
typedef __SIZE_TYPE__ size_t;
int i; int i;
struct B{}; struct B{};
struct A{ struct A{
static void* operator new(unsigned int) static void* operator new(size_t)
{return &i;} {return &i;}
inline static void operator delete(void*p); inline static void operator delete(void*p);
...@@ -23,5 +25,3 @@ inline void A::operator delete(void*p) ...@@ -23,5 +25,3 @@ inline void A::operator delete(void*p)
int main() int main()
{A *ap=new A; {A *ap=new A;
delete ap;} delete ap;}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment