This is the mail archive of the
mailing list for the GCC project.
Re: Segfault Question
On Mon, Dec 17, 2018 at 03:11:03PM +0000, Jonathan Wakely wrote:
> --- a/gcc/cp/constraint.cc
> +++ b/gcc/cp/constraint.cc
> @@ -563,7 +563,7 @@ expand_concept (tree decl, tree args)
> tree result = tsubst_expr (def, args, tf_none, NULL_TREE, true);
> - if (result == error_mark_node)
> + if (result == error_mark_node || t == NULL_TREE)
t == NULL_TREE or result == NULL_TREE ?
> return error_mark_node;
> /* And lastly, normalize it, check for implications, and save
> The point is that tsubst_expr can return NULL_TREE, we should check for it.
> Nick, please make more of an effort to explain yourself clearly, so
> people can see what you're suggesting without having to read between
> the lines. The standard way to show a proposed change is to show a
> patch. If you'd sent the patch above and said "tsubst_expr can return
> NULL_TREE" it would have taken us no time to understand.