On 8/28/24 5:55 AM, Jonathan Wakely wrote:
On Wed, 28 Aug 2024 at 10:54, Jason Merrill wrote:

Tested x86_64-pc-linux-gnu, OK for trunk?

Redefining that macro to invalidate PCH is a bit of a hack, but it's
what we have for now, so OK for trunk, thanks.

If it's just to invalidate PCH, do we want to #undef instead? Does anything care about the actual value of the macro?


-- 8< --

testsuite/lib/dg-options.exp defines __GLIBCXX__ to 9999999; avoid a macro
redefinition warning in that case.

libstdc++-v3/ChangeLog:

         * include/bits/c++config: Avoid redefining __GLIBCXX__.
---
  libstdc++-v3/include/bits/c++config | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/include/bits/c++config 
b/libstdc++-v3/include/bits/c++config
index 0f0cc7cd659..4095ac89741 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -36,7 +36,9 @@
  #define _GLIBCXX_RELEASE

  // The datestamp of the C++ library in compressed ISO date format.
+#ifndef __GLIBCXX__ /* The testsuite defines it to 99999999.  */
  #define __GLIBCXX__
+#endif

  // Macros for various attributes.
  //   _GLIBCXX_PURE

base-commit: 7f4f1bb29a47fbe63a15dda8acfe247b2e934959
--
2.46.0



Reply via email to