re PR c++/14181 (Cryptic error message for code that compiled without warnings in 3.3.x)

PR c++/14181
	* g++.dg/parse/new2.C: New test.

From-SVN: r78068
This commit is contained in:
Giovanni Bajo 2004-02-19 03:09:59 +00:00
parent 063e900f40
commit 23aa7aba4a
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14181
* g++.dg/parse/new2.C: New test.
2004-02-18 Paul Brook <paul@codesourcery.com>
* gcc.c-torture/compile/libcall-1.c: New test.

View File

@ -0,0 +1,9 @@
// { dg-do compile }
// Contributed by David Daney <daney at gcc dot gnu dot org>
// PR c++/14181: Cryptic error message for ill-formed new expressions
void f1(void)
{
(void)new (char*)[10]; // { dg-error "parenthesized|parentheses" }
(void)new char*[10];
}