Commit c12b3bd3 by Paolo Carlini Committed by Paolo Carlini

re PR c++/58609 ([c++11] ICE with uninitialized variable in constexpr)

/cp
2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58609
	* decl.c (check_initializer): Return NULL_TREE after error;
	consistently use inform.

/testsuite
2014-03-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58609
	* g++.dg/cpp0x/constexpr-ice12.C: New.

From-SVN: r208410
parent df5bc1cb
2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58609
* decl.c (check_initializer): Return NULL_TREE after error;
consistently use inform.
2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (check_initializer): Remove dead code.
2014-03-06 Marek Polacek <polacek@redhat.com>
......
......@@ -5809,9 +5809,11 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
"member %qD", decl);
if (!explained)
{
error ("(an out of class initialization is required)");
inform (input_location,
"(an out of class initialization is required)");
explained = 1;
}
return NULL_TREE;
}
return init_code;
......
2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58609
* g++.dg/cpp0x/constexpr-ice12.C: New.
2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
* c-c++-common/gomp/map-1.c: Extend.
......
// PR c++/58609
// { dg-do compile { target c++11 } }
struct A
{
static constexpr int&& i = 0; // { dg-error "initialization" }
};
int j = A::i;
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