public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
@ 2024-01-29 18:04 Adhemerval Zanella
0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:04 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2e272274652ec8635ed85f39cef34c2073d4a071
commit 2e272274652ec8635ed85f39cef34c2073d4a071
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Jan 4 10:29:09 2024 -0300
math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
Diff:
---
math/test-fesetexcept-traps.c | 10 +++++++---
math/test-fexcept-traps.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/math/test-fesetexcept-traps.c b/math/test-fesetexcept-traps.c
index 73f542027e..3aff7073e4 100644
--- a/math/test-fesetexcept-traps.c
+++ b/math/test-fesetexcept-traps.c
@@ -46,9 +46,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexcept (FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexcept (FE_ALL_EXCEPT);
diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
index 0f5802c773..83053b074d 100644
--- a/math/test-fexcept-traps.c
+++ b/math/test-fexcept-traps.c
@@ -70,9 +70,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
@ 2024-04-17 20:14 Adhemerval Zanella
0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:14 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1b803c315f36042a3e6191692eca40800210aa16
commit 1b803c315f36042a3e6191692eca40800210aa16
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Jan 4 10:29:09 2024 -0300
math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
Diff:
---
math/test-fesetexcept-traps.c | 10 +++++++---
math/test-fexcept-traps.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/math/test-fesetexcept-traps.c b/math/test-fesetexcept-traps.c
index 73f542027e..3aff7073e4 100644
--- a/math/test-fesetexcept-traps.c
+++ b/math/test-fesetexcept-traps.c
@@ -46,9 +46,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexcept (FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexcept (FE_ALL_EXCEPT);
diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
index 0f5802c773..83053b074d 100644
--- a/math/test-fexcept-traps.c
+++ b/math/test-fexcept-traps.c
@@ -70,9 +70,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
@ 2024-04-02 16:00 Adhemerval Zanella
0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 16:00 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=675e9c3671769a28fb7447d59744f5446349ee78
commit 675e9c3671769a28fb7447d59744f5446349ee78
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Jan 4 10:29:09 2024 -0300
math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
Diff:
---
math/test-fesetexcept-traps.c | 10 +++++++---
math/test-fexcept-traps.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/math/test-fesetexcept-traps.c b/math/test-fesetexcept-traps.c
index 73f542027e..3aff7073e4 100644
--- a/math/test-fesetexcept-traps.c
+++ b/math/test-fesetexcept-traps.c
@@ -46,9 +46,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexcept (FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexcept (FE_ALL_EXCEPT);
diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
index 0f5802c773..83053b074d 100644
--- a/math/test-fexcept-traps.c
+++ b/math/test-fexcept-traps.c
@@ -70,9 +70,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
@ 2024-02-09 17:38 Adhemerval Zanella
0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:38 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f7d4a6676aaf39e53a1b7d12740806b68156f784
commit f7d4a6676aaf39e53a1b7d12740806b68156f784
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Jan 4 10:29:09 2024 -0300
math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
Diff:
---
math/test-fesetexcept-traps.c | 10 +++++++---
math/test-fexcept-traps.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/math/test-fesetexcept-traps.c b/math/test-fesetexcept-traps.c
index 73f542027e..3aff7073e4 100644
--- a/math/test-fesetexcept-traps.c
+++ b/math/test-fesetexcept-traps.c
@@ -46,9 +46,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexcept (FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexcept (FE_ALL_EXCEPT);
diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
index 0f5802c773..83053b074d 100644
--- a/math/test-fexcept-traps.c
+++ b/math/test-fexcept-traps.c
@@ -70,9 +70,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
^ permalink raw reply [flat|nested] 5+ messages in thread
* [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
@ 2024-02-07 14:14 Adhemerval Zanella
0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:14 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ac4c5dce2179d78280354bb6d921030e158bc46
commit 0ac4c5dce2179d78280354bb6d921030e158bc46
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Jan 4 10:29:09 2024 -0300
math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
Diff:
---
math/test-fesetexcept-traps.c | 10 +++++++---
math/test-fexcept-traps.c | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/math/test-fesetexcept-traps.c b/math/test-fesetexcept-traps.c
index 73f542027e..3aff7073e4 100644
--- a/math/test-fesetexcept-traps.c
+++ b/math/test-fesetexcept-traps.c
@@ -46,9 +46,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexcept (FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexcept (FE_ALL_EXCEPT);
diff --git a/math/test-fexcept-traps.c b/math/test-fexcept-traps.c
index 0f5802c773..83053b074d 100644
--- a/math/test-fexcept-traps.c
+++ b/math/test-fexcept-traps.c
@@ -70,9 +70,13 @@ do_test (void)
Also check if the function does not alter the exception mask. */
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
- _Static_assert (!(EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float)),
- "EXCEPTION_SET_FORCES_TRAP only makes sense if the "
- "architecture suports exceptions");
+ if (EXCEPTION_SET_FORCES_TRAP && !EXCEPTION_TESTS(float))
+ {
+ puts ("EXCEPTION_SET_FORCES_TRAP only makes sense if the architecture "
+ "suports exceptions");
+ return 77;
+ }
+
{
int exc_before = fegetexcept ();
ret = fesetexceptflag (&saved, FE_ALL_EXCEPT);
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-17 20:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 18:04 [glibc/azanella/clang] math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAP Adhemerval Zanella
2024-02-07 14:14 Adhemerval Zanella
2024-02-09 17:38 Adhemerval Zanella
2024-04-02 16:00 Adhemerval Zanella
2024-04-17 20:14 Adhemerval Zanella
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).