This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50054] New: Fails to recover from type error in function signature
- From: "stiffy2 at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Aug 2011 08:02:26 +0000
- Subject: [Bug c++/50054] New: Fails to recover from type error in function signature
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50054
Bug #: 50054
Summary: Fails to recover from type error in function signature
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: stiffy2@gmx.de
GCC fails to recover from the type error in the function signature of g and
crashes:
void g( const int& (a)[1] ) {}
int main () {
g( { 1, 2 } );
}
It doesn't crash when g( { 1, 2 } ); is deleted.
================ Using 4.7
Call to GCC with error message:
% LANG=C make CXXFLAGS="-std=c++0x" listinit
g++ -std=c++0x listinit.cpp -o listinit
listinit.cpp:1:25: error: declaration of `a' as array of references
listinit.cpp: In function `int main()':
listinit.cpp:4:17: internal compiler error: in cxx_incomplete_type_diagnostic,
at cp/typeck2.c:453
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
GCC Version:
% LANG=C g++ -v
Using built-in specs.
COLLECT_GCC=/home/evnu/bin/g++
COLLECT_LTO_WRAPPER=/home/evnu/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --enable-plugin --enable-cloog-backend=isl
--with-ppl --enable-__cxa_atexit --with-system-zlib --enable-shared
--enable-threads=posix --enable-languages=c,c++ --disable-multilib
--prefix=/home/evnu
Thread model: posix
gcc version 4.7.0 20110808 (experimental) (GCC)
=============== Using GCC 4.6
Call to GCC with error message:
% LANG=C make CXXFLAGS="-std=c++0x" listinit CXX=/usr/bin/g++
/usr/bin/g++ -std=c++0x listinit.cpp -o listinit
listinit.cpp:1:25: error: declaration of 'a' as array of references
listinit.cpp:4: confused by earlier errors, bailing out
GCC Version:
% LANG=C /usr/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.6.1/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object
--enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto
--enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--enable-multilib --disable-libstdcxx-pch --enable-checking=release
Thread model: posix
gcc version 4.6.1 (GCC)