public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23
@ 2022-04-14  1:44 cooky.ykooc922 at gmail dot com
  2022-04-14  9:18 ` [Bug libstdc++/105269] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cooky.ykooc922 at gmail dot com @ 2022-04-14  1:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105269

            Bug ID: 105269
           Summary: missing some library feature test macros in c++20 and
                    c++23
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cooky.ykooc922 at gmail dot com
  Target Milestone: ---

Given the code:

#include <version>

#ifndef __cpp_lib_constexpr_vector
#   warning "__cpp_lib_constexpr_vector is not defined"
#endif

#ifndef __cpp_lib_stdatomic_h
#   warning "__cpp_lib_stdatomic_h is not defined"
#endif 

#ifdef __cpp_lib_monadic_optional
#   warning "__cpp_lib_monadic_optional shouldn't be defined since LWG3621"
#   if __cpp_lib_optional != 202110L
#       warning "__cpp_lib_optional value should be adjusted to 202110L since
LWG3621"
#   endif
#endif

all warnings are emitted:
<source>:4:5: warning: #warning "__cpp_lib_constexpr_vector is not defined"
[-Wcpp]
    4 | #   warning "__cpp_lib_constexpr_vector is not defined"
      |     ^~~~~~~
<source>:8:5: warning: #warning "__cpp_lib_stdatomic_h is not defined" [-Wcpp]
    8 | #   warning "__cpp_lib_stdatomic_h is not defined"
      |     ^~~~~~~
<source>:12:5: warning: #warning "__cpp_lib_monadic_optional shouldn't be
defined since LWG3621" [-Wcpp]
   12 | #   warning "__cpp_lib_monadic_optional shouldn't be defined since
LWG3621"
      |     ^~~~~~~
<source>:14:9: warning: #warning "__cpp_lib_optional value should be adjusted
to 202110L since LWG3621" [-Wcpp]
   14 | #       warning "__cpp_lib_optional value should be adjusted to 202110L
since LWG3621"
      |         ^~~~~~~
Compiler returned: 0

godbolt link: https://godbolt.org/z/Y9Wqccnv3

since:
 -
https://github.com/gcc-mirror/gcc/commit/1ae8edf5f73ca5c3bf132cc52825dc1f709499dd
is committed to implementing constexpr std::vector (C++20)
-
https://github.com/gcc-mirror/gcc/commit/d7f2a09e98520c4e4927f460ad96803b05a205b1
is committed to implementing <stdatomic.h> (P0943 has __cpp_lib_stdatomic_h
provided) (C++23)
-
https://github.com/gcc-mirror/gcc/commit/82b2e4f8cf5a01c6724fe3f465a77ee03cfcaae2
is commited to implementing monadic operations (before LWG3621 is adopted)
(C++23)

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

* [Bug libstdc++/105269] missing some library feature test macros in c++20 and c++23
  2022-04-14  1:44 [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23 cooky.ykooc922 at gmail dot com
@ 2022-04-14  9:18 ` redi at gcc dot gnu.org
  2022-04-14 10:46 ` cvs-commit at gcc dot gnu.org
  2022-04-14 11:06 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-14  9:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105269

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
   Last reconfirmed|                            |2022-04-14
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Target Milestone|---                         |12.0

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

* [Bug libstdc++/105269] missing some library feature test macros in c++20 and c++23
  2022-04-14  1:44 [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23 cooky.ykooc922 at gmail dot com
  2022-04-14  9:18 ` [Bug libstdc++/105269] " redi at gcc dot gnu.org
@ 2022-04-14 10:46 ` cvs-commit at gcc dot gnu.org
  2022-04-14 11:06 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-14 10:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105269

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:d2f8208e9add01fe10ee56307cc79631b9995f74

commit r12-8154-gd2f8208e9add01fe10ee56307cc79631b9995f74
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Apr 14 10:28:03 2022 +0100

    libstdc++: Fix missing and incorrect feature test macros [PR105269]

    libstdc++-v3/ChangeLog:

            PR libstdc++/105269
            * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
            Define.
            * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
            Define.
            * include/std/optional (__cpp_lib_optional): Define new value
            for C++23.
            (__cpp_lib_monadic_optional): Remove.
            * include/std/version (__cpp_lib_constexpr_vector): Define.
            (__cpp_lib_stdatomic_h): Define.
            (__cpp_lib_optional): Define new value for C++23.
            (__cpp_lib_monadic_optional): Remove.
            * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
            * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
            * testsuite/20_util/optional/version.cc: Likewise.
            * testsuite/23_containers/vector/cons/constexpr.cc: Check
            feature test macro.
            * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
            Likewise.
            * testsuite/20_util/optional/monadic/version.cc: Removed.
            * testsuite/23_containers/vector/requirements/version.cc: New test.
            * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.

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

* [Bug libstdc++/105269] missing some library feature test macros in c++20 and c++23
  2022-04-14  1:44 [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23 cooky.ykooc922 at gmail dot com
  2022-04-14  9:18 ` [Bug libstdc++/105269] " redi at gcc dot gnu.org
  2022-04-14 10:46 ` cvs-commit at gcc dot gnu.org
@ 2022-04-14 11:06 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-04-14 11:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105269

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed, thanks for the report.

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

end of thread, other threads:[~2022-04-14 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14  1:44 [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23 cooky.ykooc922 at gmail dot com
2022-04-14  9:18 ` [Bug libstdc++/105269] " redi at gcc dot gnu.org
2022-04-14 10:46 ` cvs-commit at gcc dot gnu.org
2022-04-14 11:06 ` redi at gcc dot gnu.org

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