https://gcc.gnu.org/g:67a282023bab5b82687a698de12f5ba8309c3be8

commit r13-9545-g67a282023bab5b82687a698de12f5ba8309c3be8
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue Apr 15 14:01:55 2025 +0100

    libstdc++: Add test for not using reserved name 'ranges' before C++20
    
    This is a test for a bug that was present on trunk, because 'ranges' is
    not a reserved name before C++20.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/17_intro/names.cc: Check ranges is not used as an
            identifier before C++20.

Diff:
---
 libstdc++-v3/testsuite/17_intro/names.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libstdc++-v3/testsuite/17_intro/names.cc 
b/libstdc++-v3/testsuite/17_intro/names.cc
index 1a02525e0bdc..c0b4b24f2339 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -140,6 +140,10 @@
 #define try_emplace (
 #endif
 
+#if __cplusplus < 202002L
+#define ranges (
+#endif
+
 // These clash with newlib so don't use them.
 # define __lockable            cannot be used as an identifier
 # define __packed              cannot be used as an identifier

Reply via email to