public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Complete _GLIBCXX_DEBUG constexpr compatibility
Date: Fri, 11 Dec 2020 10:29:23 +0000	[thread overview]
Message-ID: <20201211102923.GE2309743@redhat.com> (raw)
In-Reply-To: <3dfe6dda-329b-2ee8-ecdb-2c1c147044f7@gmail.com>

On 11/12/20 08:20 +0100, François Dumont via Libstdc++ wrote:
>Hi
>
>I'd like to commit this small fix to complete _GLIBCXX_DEBUG constexpr 
>compatibility. There are still 2 macros not using __glibcxx_assert_1.
>
>It fixes the generated diagnostic to have the __failed_assertion 
>rather than a message saying that _Error_formatter::_M_error is not 
>constexpr.
>
>    libstdc++: Fix _GLIBCXX_DEBUG mode constexpr compatibility
>
>    The __glibcxx_check_can_[increment|decrement]_range macros are 
>using the
>    _GLIBCXX_DEBUG_VERIFY_COND_AT macro which is not constexpr 
>compliant and will produce nasty
>    diagnostics rather than the std::__failed_assertion dedicated to 
>constexpr. Replace it with
>    correct _GLIBCXX_DEBUG_VERIFY_AT_F.
>
>    libstdc++-v3/ChangeLog:
>            * include/debug/macros.h 
>(__glibcxx_check_can_increment_range): Replace
>            _GLIBCXX_DEBUG_VERIFY_COND_AT usage with 
>_GLIBCXX_DEBUG_VERIFY_AT_F.
>            (__glibcxx_check_can_decrement_range): Likewise.
>            * testsuite/25_algorithms/copy_backward/constexpr.cc 
>(test03): New.
>            * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: New 
>test.
>            * 
>testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: New 
>test.
>            * testsuite/25_algorithms/equal/constexpr_neg.cc: New test.
>            * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: 
>New test.
>
>Tested under Linux x86_64 normal and debug modes.
>
>Ok to commit ?

OK, thanks.

Please also test with RUNTESTFLAGS=--target_board=unix/-std=gnu++11
just to be sure, but I don't think these macros are used in any code
that is constexpr in C++11.



      reply	other threads:[~2020-12-11 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  7:20 François Dumont
2020-12-11 10:29 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201211102923.GE2309743@redhat.com \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).