This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51660] New: ICE on function missing argument list
- From: "cas43 at cs dot stanford.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 06:31:38 +0000
- Subject: [Bug c++/51660] New: ICE on function missing argument list
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51660
Bug #: 51660
Summary: ICE on function missing argument list
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: cas43@cs.stanford.edu
g++ crashes on this (invalid) program:
struct s
{
static int x {return 0;}
};
Output:
crashes/6.cpp:3:16: warning: extended initializer lists only available with
-std=c++11 or -std=gnu++11 [enabled by default]
crashes/6.cpp:3:19: error: expected primary-expression before âreturnâ
crashes/6.cpp:3:19: error: expected â}â before âreturnâ
crashes/6.cpp:3:19: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
How to run: g++ file.cpp
Note that this program does not cause gcc to crash if compiled as C.
Compiler version:
Using built-in specs.
COLLECT_GCC=/new-gcc/i-4.7/bin/g++
COLLECT_LTO_WRAPPER=/new-gcc/i-4.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.7/configure --prefix=/new-gcc/i-4.7
Thread model: posix
gcc version 4.7.0 20111223 (experimental) (GCC)