Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/analyzer/pr94028.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
line wrap: on
line source
void *calloc (__SIZE_TYPE__, __SIZE_TYPE__); struct B { B (short); int cls; } k (0); void d (int); enum e {} i; struct j { void *operator new (__SIZE_TYPE__ b) { return calloc (b, sizeof (int)); // { dg-warning "leak" } } j (B *, int) { } // { dg-warning "leak" } }; j * f (B * b, int h, bool) { d (b->cls); return new j (b, h); // { dg-warning "leak" } } void m () { if (i) f (&k, 0, false); }