diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3bacb3bef04..424dd559f9a 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 00000000000..d233b68caf4 --- /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]; +}