struct CTest
{
char payload[1024];
int * ptr;
};
CTest test()
{
static char seed=0;
CTest a = { {seed++}, new int };
return a;
}
int main(){
test(); //Где мой ворнинг???
return 0;
}
[legolegs@battlehummer ~]$ g++ -Wall -Wextra -std=c++0x -Wunused-value test.cpp
[legolegs@battlehummer ~]$