public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cooky.ykooc922 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/105269] New: missing some library feature test macros in c++20 and c++23
Date: Thu, 14 Apr 2022 01:44:47 +0000	[thread overview]
Message-ID: <bug-105269-4@http.gcc.gnu.org/bugzilla/> (raw)

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)

             reply	other threads:[~2022-04-14  1:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14  1:44 cooky.ykooc922 at gmail dot com [this message]
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

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=bug-105269-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).