From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 911713858431; Mon, 6 Feb 2023 14:25:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 911713858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675693530; bh=Ylo/IxBeADYCT+pO07fQ7BztydMRakb3N1Qa8Ht8JdA=; h=From:To:Subject:Date:From; b=cipQQKzqsL9sNSm1c+nv0LkqoupByR5/MrMp7MrmR+hrcMVe9lSDYn6YZzLR8J44w Ze0KweH2VnUALPGvLwPW9qhkIBLbSOMtwc3hekHEwKohXFVBm1K/HNlXTF7bF3TscU a4WI1mX8E1dqSiupQql6vAV6bqSTer4/GHkGRR2A= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-5714] libstdc++: Normalise _GLIBCXX20_DEPRECATED macro X-Act-Checkin: gcc X-Git-Author: Nathaniel Shead X-Git-Refname: refs/heads/master X-Git-Oldrev: abdea447250e994c2de95a68cbc79d312cc54863 X-Git-Newrev: 4f49ae607cb1ed312fd63967ede418601343ef24 Message-Id: <20230206142530.911713858431@sourceware.org> Date: Mon, 6 Feb 2023 14:25:30 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4f49ae607cb1ed312fd63967ede418601343ef24 commit r13-5714-g4f49ae607cb1ed312fd63967ede418601343ef24 Author: Nathaniel Shead Date: Thu Dec 29 01:28:11 2022 +1100 libstdc++: Normalise _GLIBCXX20_DEPRECATED macro Updates _GLIBCXX20_DEPRECATED to be defined and behave the same as the versions for other standards (e.g. _GLIBCXX17_DEPRECATED). libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Update macros. * include/bits/c++config (_GLIBCXX20_DEPRECATED): Make consistent with other 'deprecated' macros. * include/std/type_traits (is_pod, is_pod_v): Use _GLIBCXX20_DEPRECATED_SUGGEST instead. Signed-off-by: Nathaniel Shead Reviewed-by: Jonathan Wakely Diff: --- libstdc++-v3/doc/doxygen/user.cfg.in | 4 ++-- libstdc++-v3/include/bits/c++config | 6 +++--- libstdc++-v3/include/std/type_traits | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in index 834ad9e4fd5..fc46e722529 100644 --- a/libstdc++-v3/doc/doxygen/user.cfg.in +++ b/libstdc++-v3/doc/doxygen/user.cfg.in @@ -2394,8 +2394,8 @@ PREDEFINED = __cplusplus=202002L \ "_GLIBCXX11_DEPRECATED_SUGGEST(E)= " \ "_GLIBCXX17_DEPRECATED= " \ "_GLIBCXX17_DEPRECATED_SUGGEST(E)= " \ - "_GLIBCXX20_DEPRECATED(E)= " \ - "_GLIBCXX20_DEPRECATED(E)= " \ + "_GLIBCXX20_DEPRECATED= " \ + "_GLIBCXX20_DEPRECATED_SUGGEST(E)= " \ _GLIBCXX17_INLINE=inline \ _GLIBCXX_CHRONO_INT64_T=int64_t \ _GLIBCXX_DEFAULT_ABI_TAG \ diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 0d9619e2b69..adbb4a6e11f 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -84,7 +84,7 @@ // _GLIBCXX14_DEPRECATED_SUGGEST( string-literal ) // _GLIBCXX17_DEPRECATED // _GLIBCXX17_DEPRECATED_SUGGEST( string-literal ) -// _GLIBCXX20_DEPRECATED( string-literal ) +// _GLIBCXX20_DEPRECATED // _GLIBCXX20_DEPRECATED_SUGGEST( string-literal ) #ifndef _GLIBCXX_USE_DEPRECATED # define _GLIBCXX_USE_DEPRECATED 1 @@ -124,10 +124,10 @@ #endif #if defined(__DEPRECATED) && (__cplusplus >= 202002L) -# define _GLIBCXX20_DEPRECATED(MSG) [[deprecated(MSG)]] +# define _GLIBCXX20_DEPRECATED [[__deprecated__]] # define _GLIBCXX20_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT) #else -# define _GLIBCXX20_DEPRECATED(MSG) +# define _GLIBCXX20_DEPRECATED # define _GLIBCXX20_DEPRECATED_SUGGEST(ALT) #endif diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 7e69c09566a..3f31950de29 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -815,7 +815,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Could use is_standard_layout && is_trivial instead of the builtin. template struct - _GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead") + _GLIBCXX20_DEPRECATED_SUGGEST("is_standard_layout && is_trivial") is_pod : public integral_constant { @@ -3210,7 +3210,7 @@ template template inline constexpr bool is_standard_layout_v = __is_standard_layout(_Tp); template - _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead") + _GLIBCXX20_DEPRECATED_SUGGEST("is_standard_layout_v && is_trivial_v") inline constexpr bool is_pod_v = __is_pod(_Tp); template _GLIBCXX17_DEPRECATED