On Thu, Feb 26, 2015 at 01:26:01PM +0100, Kai Tietz wrote:
@@ -2935,7 +2935,7 @@ cxx_eval_constant_expression (const constexpr_ctx
*ctx, tree t,
constexpr_ctx new_ctx;
tree r = t;
- if (t == error_mark_node)
+ if (t == NULL_TREE || t == error_mark_node)
{
On 02/26/2015 07:22 AM, Marek Polacek wrote:
- if (t == error_mark_node)
+ if (t == NULL_TREE || t == error_mark_node)
{
*non_constant_p = true;
No, we don't want an empty return to make the call non-constant, it's
perfectly valid. Let's handle this specifically in the
On Thu, Feb 26, 2015 at 08:35:00AM -0500, Jason Merrill wrote:
On 02/26/2015 07:22 AM, Marek Polacek wrote:
- if (t == error_mark_node)
+ if (t == NULL_TREE || t == error_mark_node)
{
*non_constant_p = true;
No, we don't want an empty return to make the call non-constant,
OK, thanks.
Jason
We ICE on this invalid testcase in C++14 because in C++14 a function returning
void is a valid constexpr function, so adl_swap is registered as one, while in
C++11 it is not registered. Then later on, we weren't able to properly handle
a RETURN_EXPR with null operand when trying to evaluate the
Hi Marek,
I have similiar change on the c++-delayed-fold branch.
2015-02-26 13:22 GMT+01:00 Marek Polacek pola...@redhat.com:
We ICE on this invalid testcase in C++14 because in C++14 a function returning
void is a valid constexpr function, so adl_swap is registered as one, while in
C++11 it