12 char* p
= new char[1024];
16 p
= static_cast<char *>(realloc(p
, 0));
18 cout
<< "p not nullptr after realloc 0\n";
20 cout
<< "p is nullptr after realloc 0\n";
23 perror("realloc(something, 0):");
29 volatile void *ptr
= NULL
;
30 volatile size_t size
= 0U;
31 char *p2
= static_cast<char *>(realloc(const_cast<void*>(ptr
), size
));
33 cout
<< "p2 not nullptr after realloc 0\n";
35 cout
<< "p2 is nullptr after realloc 0\n";
38 perror("realloc(NULL, 0):");