[clang] [clang] Document CWG3129 as resolved (PR #206335)
Jan Schultke via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 28 09:02:56 PDT 2026
https://github.com/eisenwave updated https://github.com/llvm/llvm-project/pull/206335
>From b7f8ed714fd1fe753fc17cbf7224cd30943efebf Mon Sep 17 00:00:00 2001
From: Eisenwave <me at eisenwave.net>
Date: Sun, 28 Jun 2026 15:57:58 +0200
Subject: [PATCH 1/3] [clang] Document CWG3129 as resolved
---
clang/www/cxx_dr_status.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index ef30b5eefea13..4eaf0c44ab082 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -21720,7 +21720,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td>[<a href="https://wg21.link/lex.fcon">lex.fcon</a>]</td>
<td>DR</td>
<td>Clarify which <I>floating-point-literal</I>s are valid</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Clang 2.7</td>
</tr>
<tr id="3130">
<td><a href="https://cplusplus.github.io/CWG/issues/3130.html">3130</a></td>
>From 33aecf2d4c6d9ffef9bc05eb8b0e58ee4298e9d4 Mon Sep 17 00:00:00 2001
From: Eisenwave <me at eisenwave.net>
Date: Sun, 28 Jun 2026 16:55:51 +0200
Subject: [PATCH 2/3] Add test, change minimum version to 3.0
---
clang/test/CXX/drs/cwg3129.cpp | 20 ++++++++++++++++++++
clang/www/cxx_dr_status.html | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 clang/test/CXX/drs/cwg3129.cpp
diff --git a/clang/test/CXX/drs/cwg3129.cpp b/clang/test/CXX/drs/cwg3129.cpp
new file mode 100644
index 0000000000000..f4bfe81389741
--- /dev/null
+++ b/clang/test/CXX/drs/cwg3129.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++98 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++11 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++14 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++17 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++20 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++23 %s -pedantic-errors -verify=expected
+// RUN: %clang_cc1 -std=c++2c %s -pedantic-errors -verify=expected
+
+namespace cwg3129 { // cwg3129: 3.0
+
+float huge_f = 1e10000000000F; // expected-warning {{floating-point constant too large}}
+float tiny_f = 1e-1000000000F; // expected-warning {{floating-point constant too small}}
+
+double huge_d = 1e10000000000; // expected-warning {{floating-point constant too large}}
+double tiny_d = 1e-1000000000; // expected-warning {{floating-point constant too small}}
+
+long double huge_ld = 1e10000000000L; // expected-warning {{floating-point constant too large}}
+long double tiny_ld = 1e-1000000000L; // expected-warning {{floating-point constant too small}}
+
+} // namespace cwg3129
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 4eaf0c44ab082..9988fcd333e75 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -21720,7 +21720,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td>[<a href="https://wg21.link/lex.fcon">lex.fcon</a>]</td>
<td>DR</td>
<td>Clarify which <I>floating-point-literal</I>s are valid</td>
- <td class="full" align="center">Clang 2.7</td>
+ <td class="full" align="center">Clang 3.0</td>
</tr>
<tr id="3130">
<td><a href="https://cplusplus.github.io/CWG/issues/3130.html">3130</a></td>
>From a93d5606db76cf884b7fc2af9a757523c20a0498 Mon Sep 17 00:00:00 2001
From: Eisenwave <me at eisenwave.net>
Date: Sun, 28 Jun 2026 18:02:42 +0200
Subject: [PATCH 3/3] Move tests into cwg31xx.cpp
---
clang/test/CXX/drs/cwg3129.cpp | 20 --------------------
clang/test/CXX/drs/cwg31xx.cpp | 21 +++++++++++++++++++--
2 files changed, 19 insertions(+), 22 deletions(-)
delete mode 100644 clang/test/CXX/drs/cwg3129.cpp
diff --git a/clang/test/CXX/drs/cwg3129.cpp b/clang/test/CXX/drs/cwg3129.cpp
deleted file mode 100644
index f4bfe81389741..0000000000000
--- a/clang/test/CXX/drs/cwg3129.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -std=c++98 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++11 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++14 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++17 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++20 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++23 %s -pedantic-errors -verify=expected
-// RUN: %clang_cc1 -std=c++2c %s -pedantic-errors -verify=expected
-
-namespace cwg3129 { // cwg3129: 3.0
-
-float huge_f = 1e10000000000F; // expected-warning {{floating-point constant too large}}
-float tiny_f = 1e-1000000000F; // expected-warning {{floating-point constant too small}}
-
-double huge_d = 1e10000000000; // expected-warning {{floating-point constant too large}}
-double tiny_d = 1e-1000000000; // expected-warning {{floating-point constant too small}}
-
-long double huge_ld = 1e10000000000L; // expected-warning {{floating-point constant too large}}
-long double tiny_ld = 1e-1000000000L; // expected-warning {{floating-point constant too small}}
-
-} // namespace cwg3129
diff --git a/clang/test/CXX/drs/cwg31xx.cpp b/clang/test/CXX/drs/cwg31xx.cpp
index c5d6322009093..8c77b73c0cefe 100644
--- a/clang/test/CXX/drs/cwg31xx.cpp
+++ b/clang/test/CXX/drs/cwg31xx.cpp
@@ -14,8 +14,6 @@
// RUN: %clang_cc1 -std=c++23 %s -fexceptions -fcxx-exceptions -pedantic-errors -fexperimental-new-constant-interpreter -verify-directives -verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20
// RUN: %clang_cc1 -std=c++2c %s -fexceptions -fcxx-exceptions -pedantic-errors -fexperimental-new-constant-interpreter -verify-directives -verify=expected,since-cxx11,since-cxx14,since-cxx17,since-cxx20
-// cxx98-14-no-diagnostics
-
namespace cwg3106 { // cwg3106: 2.7
#if __cplusplus >= 201103L
const char str[9] = R"(\u{1234})";
@@ -29,6 +27,25 @@ static_assert(noexcept(noexcept(f())), "");
#endif
} // namespace cwg3128
+namespace cwg3129 { // cwg3129: 3.0
+
+float huge_f = 1e10000000000F;
+// expected-warning at -1 {{magnitude of floating-point constant too large for type 'float'; maximum is 3.40282347E+38}}
+float tiny_f = 1e-1000000000F;
+// expected-warning at -1 {{magnitude of floating-point constant too small for type 'float'; minimum is 1.40129846E-45}}
+
+double huge_d = 1e10000000000;
+// expected-warning at -1 {{magnitude of floating-point constant too large for type 'double'; maximum is 1.7976931348623157E+308}}
+double tiny_d = 1e-1000000000;
+// expected-warning at -1 {{magnitude of floating-point constant too small for type 'double'; minimum is 4.9406564584124654E-324}}
+
+long double huge_ld = 1e10000000000L;
+// expected-warning at -1 {{magnitude of floating-point constant too large for type 'long double'; maximum is 1.18973149535723176502E+4932}}
+long double tiny_ld = 1e-1000000000L;
+// expected-warning at -1 {{magnitude of floating-point constant too small for type 'long double'; minimum is 3.64519953188247460253E-4951}}
+
+} // namespace cwg3129
+
namespace cwg3135 { // cwg3135: 23
#if __cplusplus >= 201703L
struct Pinned {
More information about the cfe-commits
mailing list