From: Giovanni Bajo Date: Thu, 19 Feb 2004 03:09:59 +0000 (+0000) Subject: re PR c++/14181 (Cryptic error message for code that compiled without warnings in... X-Git-Tag: releases/gcc-4.0.0~10015 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23aa7aba4a93d068bc75ed006066005e82c25c90;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3bacb3bef04d..424dd559f9a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-19 Giovanni Bajo + + PR c++/14181 + * g++.dg/parse/new2.C: New test. + 2004-02-18 Paul Brook * gcc.c-torture/compile/libcall-1.c: New test. diff --git a/gcc/testsuite/g++.dg/parse/new2.C b/gcc/testsuite/g++.dg/parse/new2.C new file mode 100644 index 000000000000..d233b68caf46 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/new2.C @@ -0,0 +1,9 @@ +// { dg-do compile } +// Contributed by David Daney +// 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]; +}