This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]