http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48599
Summary: [C++0x] no diagnostic for invalid use of auto with array declarator Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: hst...@ca.ibm.com Host: powerpc64-unknown-linux-gnu Target: powerpc64-unknown-linux-gnu A program is ill-formed if an array declarator is used to declare an entity whose type contains the auto type specifier. A diagnostic is expected. See subclause 8.3.4 [dcl.array] paragraph 1 in the 2011 FDIS. ### Self-contained source (a.cpp): int v[1]; auto (*p)[1] = &v; ### Command to reproduce: g++ -std=c++0x -Wall -W -pedantic -c a.cpp -o a.o ### Compiler output: (No messages; return code 0) ### g++ -v output: Using built-in specs. Target: powerpc64-unknown-linux-gnu Configured with: ../gcc-4.5.0/configure --prefix=/data/gcc --program-suffix=-4.5.0 --disable-libssp --disable-libgcj --enable-version-specific-runtime-libs --with-cpu=default32 --enable-secureplt --with-long-double-128 --enable-shared --enable-__cxa_atexit --enable-threads=posix --enable-languages=c,c++,fortran Thread model: posix gcc version 4.5.0 (GCC)