[tree-ssa] C++ parsing bug?

Kedar Namjoshi kedar@research.bell-labs.com
Thu Dec 4 20:19:00 GMT 2003


  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];
}
//=====================================================================



More information about the Gcc mailing list