aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wuninitialized-32.C
blob: 144a99e0f9385437685f562b1295469432f1b4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile }
// { dg-additional-options "-Wall" }

void* operator new[](__SIZE_TYPE__, void* __p);

struct allocator
{
  ~allocator();
};

void *foo (void *p)
{
  return p ? new(p) allocator[1] : new allocator[1]; // { dg-bogus "uninitialized" }
}