On Thu, Feb 04, 2021 at 03:43:33PM -0500, Jason Merrill via Gcc-patches wrote:
> Nice when fixing a bug is as easy as removing incorrect checks.
> 
> gcc/cp/ChangeLog:
> 
>       PR c++/98717
>       * constraint.cc (build_concept_check_arguments): Remove assert.
>       (build_concept_check): Allow empty args.
> 
> gcc/testsuite/ChangeLog:
> 
>       PR c++/98717
>       * g++.dg/cpp2a/concepts-variadic3.C: New test.
> ---
>  gcc/cp/constraint.cc                            | 8 --------
>  gcc/testsuite/g++.dg/cpp2a/concepts-variadic3.C | 7 +++++++
>  2 files changed, 7 insertions(+), 8 deletions(-)
>  create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-variadic3.C
> 
> diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
> index 9049d087859..31e0fb5079a 100644
> --- a/gcc/cp/constraint.cc
> +++ b/gcc/cp/constraint.cc
> @@ -1345,7 +1345,6 @@ build_concept_check_arguments (tree arg, tree rest)
>      }
>    else
>      {
> -      gcc_assert (rest != NULL_TREE);
>        args = rest;
>      }

Could even remove the braces now!  :)

Marek

Reply via email to