Commit bd459a61 by Paolo Carlini Committed by Paolo Carlini

re PR c++/57947 (internal compiler error: Segmentation fault using extended…

re PR c++/57947 (internal compiler error: Segmentation fault using extended initializer lists without -std=c++11 or -std=gnu++11)

/cp
2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57947
	* call.c (is_std_init_list): Return false if cxx_dialect == cxx98.

/testsuite
2013-07-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57947
	* g++.dg/parse/crash63.C: New.

From-SVN: r201344
parent 02cab1c1
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57947
* call.c (is_std_init_list): Return false if cxx_dialect == cxx98.
2013-07-29 Jason Merrill <jason@redhat.com>
PR c++/57901
......
......@@ -9396,6 +9396,8 @@ is_std_init_list (tree type)
/* Look through typedefs. */
if (!TYPE_P (type))
return false;
if (cxx_dialect == cxx98)
return false;
type = TYPE_MAIN_VARIANT (type);
return (CLASS_TYPE_P (type)
&& CP_TYPE_CONTEXT (type) == std_node
......
2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57947
* g++.dg/parse/crash63.C: New.
2013-07-30 Tobias Burnus <burnus@net-b.de>
PR fortran/57530
......
// PR c++/57947
// { dg-options "-std=c++98" }
namespace std
{
template <class E> class initializer_list {};
template <int N> struct D { D(initializer_list<int>) {} };
D<0> d {1, 2, 3}; // { dg-error "constructor|no matching" }
// { dg-warning "initializer list" "" { target *-*-* } 8 }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment