public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6145] Fortran: keep values of IEEE_CLASS_TYPE in sync
@ 2021-12-29 20:38 Franथईois-Xavier Coudert
0 siblings, 0 replies; only message in thread
From: Franथईois-Xavier Coudert @ 2021-12-29 20:38 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ade9130f50905e82c8557c3df049cd1147c11986
commit r12-6145-gade9130f50905e82c8557c3df049cd1147c11986
Author: Francois-Xavier Coudert <fxcoudert@gmail.com>
Date: Wed Dec 29 21:32:57 2021 +0100
Fortran: keep values of IEEE_CLASS_TYPE in sync
Fortran 2018 added some synonyms to the existing values, namely
IEEE_NEGATIVE_SUBNORMAL (which is the same as IEEE_NEGATIVE_DENORMAL)
and IEEE_POSITIVE_SUBNORMAL (same as IEEE_POSITIVE_DENORMAL). When they
were added to the C side, they were not kept in sync with the Fortran
part of the library. Thew new values are not used (yet), so it is
currently harmless, but better fix it.
libgfortran/ChangeLog:
* ieee/ieee_helper.c: Fix enum values.
Diff:
---
libgfortran/ieee/ieee_helper.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/libgfortran/ieee/ieee_helper.c b/libgfortran/ieee/ieee_helper.c
index c9236d34139..fd2ba69488b 100644
--- a/libgfortran/ieee/ieee_helper.c
+++ b/libgfortran/ieee/ieee_helper.c
@@ -47,11 +47,22 @@ internal_proto(ieee_class_helper_16);
correspond to the hidden arguments of the IEEE_CLASS_TYPE
derived-type of IEEE_ARITHMETIC. */
-enum { IEEE_OTHER_VALUE = 0, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN,
- IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL,
- IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL,
- IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF, IEEE_SUBNORMAL,
- IEEE_NEGATIVE_SUBNORMAL, IEEE_POSITIVE_SUBNORMAL };
+enum {
+ IEEE_OTHER_VALUE = 0,
+ IEEE_SIGNALING_NAN,
+ IEEE_QUIET_NAN,
+ IEEE_NEGATIVE_INF,
+ IEEE_NEGATIVE_NORMAL,
+ IEEE_NEGATIVE_DENORMAL,
+ IEEE_NEGATIVE_SUBNORMAL = IEEE_NEGATIVE_DENORMAL,
+ IEEE_NEGATIVE_ZERO,
+ IEEE_POSITIVE_ZERO,
+ IEEE_POSITIVE_DENORMAL,
+ IEEE_POSITIVE_SUBNORMAL = IEEE_POSITIVE_DENORMAL,
+ IEEE_POSITIVE_NORMAL,
+ IEEE_POSITIVE_INF
+};
+
#define CLASSMACRO(TYPE) \
int ieee_class_helper_ ## TYPE (GFC_REAL_ ## TYPE *value) \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-29 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 20:38 [gcc r12-6145] Fortran: keep values of IEEE_CLASS_TYPE in sync Franथईois-Xavier Coudert
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).