Re: Missing compile-time warning for orphaned memory

2012-05-03 Thread Samuel David
On Thu, May 3, 2012 at 1:29 PM, Jonathan Wakely wrote: > > Maybe.  If you think so then please open a bugzilla report asking for > a new warning, thanks. Done! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53215 With sincere regards, -S

Re: Missing compile-time warning for orphaned memory

2012-05-03 Thread Jonathan Wakely
On 3 May 2012 17:16, Samuel David wrote: > Hi gcc team, > > The following code creates orphaned memory by ignoring the return value of > new: [...] > Should g++ report a compile-time warning for this case? Maybe. If you think so then please open a bugzilla report asking for a new warning, than

Re: Missing compile-time warning for orphaned memory

2012-05-03 Thread Samuel David
Hi gcc team, The following code creates orphaned memory by ignoring the return value of new: #include using namespace std; int main ( void ) { for (int i=0; i< 1000; i++) new int[1000]; int a; cin >> a; return 0; } Should g++ report a compile-time warning for th