On Thu, May 14, 2026 at 03:17:23PM -0400, Eczbek wrote:
> Thanks for the feedback. How should I say that my patch has been tested in 
> the future?

https://gcc.gnu.org/contribute.html#testing has a few notes.  For
regression testing, I have something like:

export GXX_TESTSUITE_STDS=98,11,14,17,20,23,26
.../gcc/configure --enable-languages=default --enable-checking=yes 
--with-gnu-ld --with-gnu-as --disable-bootstrap --disable-libvtv 
--disable-liboffloadmic && make -j24 2>&1 | tee LOG && make -j24 -k check 2>&1 
| tee LOGC
 
which is run twice, with and without the patch, then I compare
the results with

cd .../trunk
.../gcc/contrib/test_summary > LOGT
cd .../trunk.pristine
.../gcc/contrib/test_summary > LOGT
cd .../trunk
vimdiff LOGT .../trunk.pristine/LOGT

For bootstrap I have this:

.../gcc/configure --enable-languages=default --prefix=`pwd` 
--enable-checking=yes --with-gnu-ld --with-gnu-as && make -j48 2>&1 | tee LOG

and then when submitting a patch I say:

Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?

> -- >8 --
> 
> From 794751bb0cd8f0351f0aebd8658a1cc7afd3ef7d Mon Sep 17 00:00:00 2001
> From: Eczbek <[email protected]>
> Date: Thu, 14 May 2026 15:10:44 -0400
> Subject: [PATCH] c++: Fix greater-than operator in requires expression in
>  template parameters [PR125317]
> 
>       PR c++/125317
> 
> gcc/cp/ChangeLog:
> 
>       * parser.cc (cp_parser_requirement_body): Set
>       parser->greater_than_is_operator_p.
> 
> gcc/testsuite/ChangeLog:
> 
>       * g++.dg/cpp2a/concepts-requires42.C: New test.
> ---
>  gcc/cp/parser.cc                                 | 4 ++++
>  gcc/testsuite/g++.dg/cpp2a/concepts-requires42.C | 4 ++++
>  2 files changed, 8 insertions(+)
>  create mode 100644 gcc/testsuite/g++.dg/cpp2a/concepts-requires42.C
> 
> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
> index d128de771b5..9923cf6be94 100644
> --- a/gcc/cp/parser.cc
> +++ b/gcc/cp/parser.cc
> @@ -34913,6 +34913,10 @@ cp_parser_requirement_body (cp_parser *parser)
>    if (!braces.require_open (parser))
>      return error_mark_node;
> +  /* Within the body of a requires expression, a '>' token is always the
> +    greater-than operator.  */
> +  auto gto = make_temp_override (parser->greater_than_is_operator_p, true);
> +
>    tree reqs = cp_parser_requirement_seq (parser);
>    if (!braces.require_close (parser))
> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires42.C 
> b/gcc/testsuite/g++.dg/cpp2a/concepts-requires42.C
> new file mode 100644
> index 00000000000..4521908a1c1
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires42.C
> @@ -0,0 +1,4 @@
> +// PR c++/125317
> +// { dg-do compile { target c++20 } }
> +
> +template<bool = requires { 0 > 0; }> int x;
> -- 
> 2.53.0
> 

Marek

Reply via email to