Hi GCC developers,

I have a c++ source, that I think is wrong (wrt the c++ standard), but
accepted by g++ (and msvc too)!

----------------------------------------

int
main(int argc, char** argv)
{
  char* d = new char[256, 256];
  return 0;
}

----------------------------------------

Is this the use of 'placement new' in weird syntax I didn't know
before, or is this code wrong and accidentally accepted by gcc? In the
former case, please correct me and sorry for the noise!


Thanks,
Kristof


PS.: my 'g++ -v' says:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.3.2-1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --enable-cld
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1)

PS2.: Please CC me!

Reply via email to