This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] C++ parsing bug?
- From: Kedar Namjoshi <kedar at research dot bell-labs dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 4 Dec 2003 15:10:41 -0500
- Subject: [tree-ssa] C++ parsing bug?
I'm seeing the following strange behavior with the tree-ssa C++ parser
(g++ (GCC) 3.5-tree-ssa 20031203 (merged 20031130)). Could someone explain
whether this is a bug with the new parser or a new C++ standard requirement?
thanks!
- Kedar
//======================== foo.cc ====================================
// declaring an array of size 4, each element is a pointer to int.
typedef int *INTP;
int main()
{
// this FAILS with the tree-ssa parser with the message
// "foo.cc:10: error: expected `,' or `;'", but passes with g++ version 3.3.1
int **p = new (int*) [4];
// this seemingly equivalent definition passes on both versions
int **r = new INTP [4];
// this passes on both versions as well
int **q = new int *[4];
}
//=====================================================================