This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for PR31617


I am checking in this obvious fix to the new test suite.  It adds a
dg-warning for the warning about a zero size new.

I put the original PR number in my patch even though this isn't a patch
to fix the bug, the PR number was missing from the original ChangeLog
entry to fix the bug so that patch was not recorded in PR 31617.

Steve Ellcey
sje@cup.hp.com


2007-04-26  Steve Ellcey  <sje@cup.hp.com>

	PR middle-end/31617
	* g++.dg/other/str_empty.C: Add expected warning.


Index: g++.dg/other/str_empty.C
===================================================================
--- g++.dg/other/str_empty.C	(revision 124194)
+++ g++.dg/other/str_empty.C	(working copy)
@@ -10,7 +10,7 @@ struct polynomial {
 
 void spline_rep1 ()
 {
-  new polynomial[0];
+  new polynomial[0];  // { dg-warning "allocating zero-element array" }
 }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]