From cd86c067c14bc13bf3ec3e1029afff4e4b129473 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Thu, 17 Oct 2024 18:56:26 +0200
Subject: [PATCH] Silent pedantic warning on the use of gcc specific binary
 representation

---
 include/chameleon/constants.h | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/include/chameleon/constants.h b/include/chameleon/constants.h
index 60d4751bd..5bcc5ac3c 100644
--- a/include/chameleon/constants.h
+++ b/include/chameleon/constants.h
@@ -19,7 +19,7 @@
  * @author Alycia Lisito
  * @author Terry Cojean
  * @author Matthieu Kuhn
- * @date 2023-08-22
+ * @date 2024-10-18
  *
  */
 #ifndef _chameleon_constants_h_
@@ -44,16 +44,24 @@ typedef enum chameleon_arithmetic_e {
     ChamDouble = 3,
 } cham_arithmetic_t;
 
-#define CHAM_ARITHMETIC_MASK 0b11
-
 typedef enum chameleon_ftype_e {
     ChamInt     = 0,
     ChamReal    = 1,
     ChamComplex = 2,
 } cham_ftype_t;
 
-#define CHAM_FTYPE_MASK 0b1100
-#define CHAM_MIXED_MASK 0b10000
+/**
+ * Defines the arithmetic type mask using the 1st and 2nd bits
+ */
+#define CHAM_ARITHMETIC_MASK ( 0x3 )
+/**
+ * Defines the floating type mask using the 3rd and 4th bits
+ */
+#define CHAM_FTYPE_MASK ( 0x3 << 2 )
+/**
+ * Defines the mixed precision flag mask on the 5th bit
+ */
+#define CHAM_MIXED_MASK ( 0x1 << 4 )
 
 #define cham_get_arith( _ftype_ )   ( (_ftype_) & CHAM_ARITHMETIC_MASK )
 #define cham_get_ftype( _ftype_ )   (( (_ftype_) & CHAM_FTYPE_MASK ) >> 2 )
-- 
GitLab