This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix for PR31617
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: OLGA at il dot ibm dot com
- Cc: pinskia at gmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 Apr 2007 14:02:16 -0700 (PDT)
- Subject: 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" }
}