public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix _GLIBCXX_DEBUG tests
@ 2020-12-13 14:52 François Dumont
  2020-12-13 22:17 ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: François Dumont @ 2020-12-13 14:52 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

Some tests are XPASS because array assertions have been disabled for a 
good reason in C++11.

I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks 
shouldn't target C++14 too. At the moment they are failing as expected 
but because of an Undefined Behavior no ?

The other test is failing because of some cleanup in headers which makes 
<memory> include necessary.

     libstdc++: Fix several _GLIBCXX_DEBUG tests

     libstdc++-v3/ChangeLog:

             * testsuite/23_containers/array/debug/back2_neg.cc: target 
c++14 because assertion
             for constexpr is disabled in C++11.
             * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
             * 
testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: 
Likewise.
             * 
testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include <memory>
             for shared_ptr.

Ok to commit ?

François


[-- Attachment #2: debug.patch --]
[-- Type: text/x-patch, Size: 2217 bytes --]

diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
index b14a3ec8c04..0066c671c42 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
index e099e6eb46b..a6118cfce3a 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
index 4e93c8a7d68..efb28d715e9 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
index 0d795147644..a0050ec764c 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
@@ -26,6 +26,7 @@
 // mode as it requires acquiring 2 locks at the same time.
 
 #include <vector>
+#include <memory>
 #include <thread>
 #include <functional>
 #include <testsuite_hooks.h>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-13 14:52 [PATCH] Fix _GLIBCXX_DEBUG tests François Dumont
@ 2020-12-13 22:17 ` Jonathan Wakely
  2020-12-14  6:50   ` François Dumont
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2020-12-13 22:17 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
>Some tests are XPASS because array assertions have been disabled for a 
>good reason in C++11.
>
>I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks 
>shouldn't target C++14 too. At the moment they are failing as expected 
>but because of an Undefined Behavior no ?

Hmm, maybe my "fix" for the bug was too hasty, and I should have done
this instead:

--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -684,7 +684,7 @@ namespace std
  
  #undef _GLIBCXX_HAS_BUILTIN
  
-#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >= 201402L
  # define __glibcxx_assert_1(_Condition)                \
      if (__builtin_is_constant_evaluated())     \
       {                                         \

That would allow us to keep the std::array runtime assertions for
C++11, and only disable them in constexpr contexts.


>The other test is failing because of some cleanup in headers which 
>makes <memory> include necessary.
>
>    libstdc++: Fix several _GLIBCXX_DEBUG tests
>
>    libstdc++-v3/ChangeLog:
>
>            * testsuite/23_containers/array/debug/back2_neg.cc: target 
>c++14 because assertion
>            for constexpr is disabled in C++11.
>            * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
>            * 
>testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: 
>Likewise.
>            * 
>testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include 
><memory>
>            for shared_ptr.
>
>Ok to commit ?

Yes, thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-13 22:17 ` Jonathan Wakely
@ 2020-12-14  6:50   ` François Dumont
  2020-12-14 10:08     ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: François Dumont @ 2020-12-14  6:50 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On 13/12/20 11:17 pm, Jonathan Wakely wrote:
> On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
>> Some tests are XPASS because array assertions have been disabled for 
>> a good reason in C++11.
>>
>> I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks 
>> shouldn't target C++14 too. At the moment they are failing as 
>> expected but because of an Undefined Behavior no ?
>
> Hmm, maybe my "fix" for the bug was too hasty, and I should have done
> this instead:
>
> --- a/libstdc++-v3/include/bits/c++config
> +++ b/libstdc++-v3/include/bits/c++config
> @@ -684,7 +684,7 @@ namespace std
>
>  #undef _GLIBCXX_HAS_BUILTIN
>
> -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
> +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >= 
> 201402L
>  # define __glibcxx_assert_1(_Condition)                \
>      if (__builtin_is_constant_evaluated())     \
>       {                                         \
>
> That would allow us to keep the std::array runtime assertions for
> C++11, and only disable them in constexpr contexts.

I already tried to restore this check in C++11 runtime without success 
but I didn't try this approach.

I'll have a try but C++11 forces constexpr to be just a return statement 
so I fear that it won't appreciate the additional assertion.

>
>
>> The other test is failing because of some cleanup in headers which 
>> makes <memory> include necessary.
>>
>>     libstdc++: Fix several _GLIBCXX_DEBUG tests
>>
>>     libstdc++-v3/ChangeLog:
>>
>>             * 
>> testsuite/23_containers/array/debug/back2_neg.cc: target c++14 
>> because assertion
>>             for constexpr is disabled in C++11.
>>             * 
>> testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
>>             * 
>> testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: 
>> Likewise.
>>             * 
>> testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include 
>> <memory>
>>             for shared_ptr.
>>
>> Ok to commit ?
>
> Yes, thanks.
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-14  6:50   ` François Dumont
@ 2020-12-14 10:08     ` Jonathan Wakely
  2020-12-14 21:36       ` François Dumont
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2020-12-14 10:08 UTC (permalink / raw)
  To: François Dumont; +Cc: Jonathan Wakely, libstdc++, gcc-patches

On Mon, 14 Dec 2020, 06:51 François Dumont via Libstdc++, <
libstdc++@gcc.gnu.org> wrote:

> On 13/12/20 11:17 pm, Jonathan Wakely wrote:
> > On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
> >> Some tests are XPASS because array assertions have been disabled for
> >> a good reason in C++11.
> >>
> >> I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks
> >> shouldn't target C++14 too. At the moment they are failing as
> >> expected but because of an Undefined Behavior no ?
> >
> > Hmm, maybe my "fix" for the bug was too hasty, and I should have done
> > this instead:
> >
> > --- a/libstdc++-v3/include/bits/c++config
> > +++ b/libstdc++-v3/include/bits/c++config
> > @@ -684,7 +684,7 @@ namespace std
> >
> >  #undef _GLIBCXX_HAS_BUILTIN
> >
> > -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
> > +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >=
> > 201402L
> >  # define __glibcxx_assert_1(_Condition)                \
> >      if (__builtin_is_constant_evaluated())     \
> >       {                                         \
> >
> > That would allow us to keep the std::array runtime assertions for
> > C++11, and only disable them in constexpr contexts.
>
> I already tried to restore this check in C++11 runtime without success
> but I didn't try this approach.
>
> I'll have a try but C++11 forces constexpr to be just a return statement
> so I fear that it won't appreciate the additional assertion.
>


Ah yes, we'd need something like Daniel suggested, and it's not worth it
just for C++11.

Just limiting the tests to c++14 is fine.




> >
> >
> >> The other test is failing because of some cleanup in headers which
> >> makes <memory> include necessary.
> >>
> >> Â Â Â  libstdc++: Fix several _GLIBCXX_DEBUG tests
> >>
> >> Â Â Â  libstdc++-v3/ChangeLog:
> >>
> >> Â Â Â Â Â Â Â Â Â Â Â  *
> >> testsuite/23_containers/array/debug/back2_neg.cc: target c++14
> >> because assertion
> >> Â Â Â Â Â Â Â Â Â Â Â  for constexpr is disabled in C++11.
> >> Â Â Â Â Â Â Â Â Â Â Â  *
> >> testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
> >> Â Â Â Â Â Â Â Â Â Â Â  *
> >> testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
> >> Likewise.
> >> Â Â Â Â Â Â Â Â Â Â Â  *
> >> testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include
> >> <memory>
> >> Â Â Â Â Â Â Â Â Â Â Â  for shared_ptr.
> >>
> >> Ok to commit ?
> >
> > Yes, thanks.
> >
> >
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-14 10:08     ` Jonathan Wakely
@ 2020-12-14 21:36       ` François Dumont
  2020-12-15 15:20         ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: François Dumont @ 2020-12-14 21:36 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Jonathan Wakely, libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]

On 14/12/20 11:08 am, Jonathan Wakely wrote:
>
>
> On Mon, 14 Dec 2020, 06:51 François Dumont via Libstdc++, 
> <libstdc++@gcc.gnu.org <mailto:libstdc%2B%2B@gcc.gnu.org>> wrote:
>
>     On 13/12/20 11:17 pm, Jonathan Wakely wrote:
>     > On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
>     >> Some tests are XPASS because array assertions have been
>     disabled for
>     >> a good reason in C++11.
>     >>
>     >> I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks
>     >> shouldn't target C++14 too. At the moment they are failing as
>     >> expected but because of an Undefined Behavior no ?
>     >
>     > Hmm, maybe my "fix" for the bug was too hasty, and I should have
>     done
>     > this instead:
>     >
>     > --- a/libstdc++-v3/include/bits/c++config
>     > +++ b/libstdc++-v3/include/bits/c++config
>     > @@ -684,7 +684,7 @@ namespace std
>     >
>     >  #undef _GLIBCXX_HAS_BUILTIN
>     >
>     > -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
>     > +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >=
>     > 201402L
>     >  # define __glibcxx_assert_1(_Condition)                \
>     >      if (__builtin_is_constant_evaluated())     \
>     >       {                                         \
>     >
>     > That would allow us to keep the std::array runtime assertions for
>     > C++11, and only disable them in constexpr contexts.
>
>     I already tried to restore this check in C++11 runtime without
>     success
>     but I didn't try this approach.
>
>     I'll have a try but C++11 forces constexpr to be just a return
>     statement
>     so I fear that it won't appreciate the additional assertion.
>
>
>
> Ah yes, we'd need something like Daniel suggested, and it's not worth 
> it just for C++11.
>
> Just limiting the tests to c++14 is fine.
>
>
Attached patch committed then.

François


[-- Attachment #2: debug.patch --]
[-- Type: text/x-patch, Size: 1675 bytes --]

diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/back1_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/back1_neg.cc
index 8216dea3cfb..ca3172e9e39 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/back1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/back1_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
index c6871093d2a..0f102103fe5 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/front1_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc
index 3f1ea128902..130325620e8 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc
@@ -16,7 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 //
 // { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11  xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
 
 #include <array>
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-14 21:36       ` François Dumont
@ 2020-12-15 15:20         ` Jonathan Wakely
  2020-12-15 15:41           ` Jonathan Wakely
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2020-12-15 15:20 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

On 14/12/20 22:36 +0100, François Dumont wrote:
>On 14/12/20 11:08 am, Jonathan Wakely wrote:
>>
>>
>>On Mon, 14 Dec 2020, 06:51 François Dumont via Libstdc++, 
>><libstdc++@gcc.gnu.org <mailto:libstdc%2B%2B@gcc.gnu.org>> wrote:
>>
>>    On 13/12/20 11:17 pm, Jonathan Wakely wrote:
>>    > On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
>>    >> Some tests are XPASS because array assertions have been
>>    disabled for
>>    >> a good reason in C++11.
>>    >>
>>    >> I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks
>>    >> shouldn't target C++14 too. At the moment they are failing as
>>    >> expected but because of an Undefined Behavior no ?
>>    >
>>    > Hmm, maybe my "fix" for the bug was too hasty, and I should have
>>    done
>>    > this instead:
>>    >
>>    > --- a/libstdc++-v3/include/bits/c++config
>>    > +++ b/libstdc++-v3/include/bits/c++config
>>    > @@ -684,7 +684,7 @@ namespace std
>>    >
>>    >  #undef _GLIBCXX_HAS_BUILTIN
>>    >
>>    > -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
>>    > +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >=
>>    > 201402L
>>    >  # define __glibcxx_assert_1(_Condition)                \
>>    >      if (__builtin_is_constant_evaluated())     \
>>    >       {                                         \
>>    >
>>    > That would allow us to keep the std::array runtime assertions for
>>    > C++11, and only disable them in constexpr contexts.
>>
>>    I already tried to restore this check in C++11 runtime without
>>    success
>>    but I didn't try this approach.
>>
>>    I'll have a try but C++11 forces constexpr to be just a return
>>    statement
>>    so I fear that it won't appreciate the additional assertion.
>>
>>
>>
>>Ah yes, we'd need something like Daniel suggested, and it's not 
>>worth it just for C++11.
>>
>>Just limiting the tests to c++14 is fine.
>>
>>
>Attached patch committed then.

Thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix _GLIBCXX_DEBUG tests
  2020-12-15 15:20         ` Jonathan Wakely
@ 2020-12-15 15:41           ` Jonathan Wakely
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Wakely @ 2020-12-15 15:41 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2313 bytes --]

On 15/12/20 15:20 +0000, Jonathan Wakely wrote:
>On 14/12/20 22:36 +0100, François Dumont wrote:
>>On 14/12/20 11:08 am, Jonathan Wakely wrote:
>>>
>>>
>>>On Mon, 14 Dec 2020, 06:51 François Dumont via Libstdc++, 
>>><libstdc++@gcc.gnu.org <mailto:libstdc%2B%2B@gcc.gnu.org>> wrote:
>>>
>>>   On 13/12/20 11:17 pm, Jonathan Wakely wrote:
>>>   > On 13/12/20 15:52 +0100, François Dumont via Libstdc++ wrote:
>>>   >> Some tests are XPASS because array assertions have been
>>>   disabled for
>>>   >> a good reason in C++11.
>>>   >>
>>>   >> I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks
>>>   >> shouldn't target C++14 too. At the moment they are failing as
>>>   >> expected but because of an Undefined Behavior no ?
>>>   >
>>>   > Hmm, maybe my "fix" for the bug was too hasty, and I should have
>>>   done
>>>   > this instead:
>>>   >
>>>   > --- a/libstdc++-v3/include/bits/c++config
>>>   > +++ b/libstdc++-v3/include/bits/c++config
>>>   > @@ -684,7 +684,7 @@ namespace std
>>>   >
>>>   >  #undef _GLIBCXX_HAS_BUILTIN
>>>   >
>>>   > -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
>>>   > +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >=
>>>   > 201402L
>>>   >  # define __glibcxx_assert_1(_Condition)                \
>>>   >      if (__builtin_is_constant_evaluated())     \
>>>   >       {                                         \
>>>   >
>>>   > That would allow us to keep the std::array runtime assertions for
>>>   > C++11, and only disable them in constexpr contexts.
>>>
>>>   I already tried to restore this check in C++11 runtime without
>>>   success
>>>   but I didn't try this approach.
>>>
>>>   I'll have a try but C++11 forces constexpr to be just a return
>>>   statement
>>>   so I fear that it won't appreciate the additional assertion.
>>>
>>>
>>>
>>>Ah yes, we'd need something like Daniel suggested, and it's not 
>>>worth it just for C++11.
>>>
>>>Just limiting the tests to c++14 is fine.
>>>
>>>
>>Attached patch committed then.
>
>Thanks.

I'm committing this anyway, because although it won't fix those tests,
it is useless to check __builtin_is_constant_evaluated() in C++11
mode.

Tested powerpc64le-linux, normal mode and debug mode. Pushed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1022 bytes --]

commit f072d1021e3e80539afe58ba0019fafa9a0bb7a6
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Dec 15 15:39:58 2020

    libstdc++: Do not define constexpr assertions for C++11
    
    There's no point even checking is_constant_evaluated() in C++11 mode,
    because the 'if' statement used for the assertion wouldn't be valid in a
    C++11 constexpr function anyway.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/c++config (__glibcxx_assert_1): Define as empty
            for C++11.

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 27302ed392e..155d0f46b16 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -684,7 +684,7 @@ namespace std
 
 #undef _GLIBCXX_HAS_BUILTIN
 
-#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED
+#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >= 201402L
 # define __glibcxx_assert_1(_Condition)		\
     if (__builtin_is_constant_evaluated())	\
      {						\

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-15 15:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 14:52 [PATCH] Fix _GLIBCXX_DEBUG tests François Dumont
2020-12-13 22:17 ` Jonathan Wakely
2020-12-14  6:50   ` François Dumont
2020-12-14 10:08     ` Jonathan Wakely
2020-12-14 21:36       ` François Dumont
2020-12-15 15:20         ` Jonathan Wakely
2020-12-15 15:41           ` Jonathan Wakely

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).