summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-08-24 13:47:21 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-08-24 17:38:42 +0200
commit9241b505782e1af163c78821f8fc575a79107eaa (patch)
treec63b6d63ccb7cce76e203d4f10197b2f4ff94194
parent8c3052b0322580eba62de91f04ba657f7dfe360e (diff)
_Generic.3: EXAMPLES: Use a constant expression
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--man3/_Generic.38
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/_Generic.3 b/man3/_Generic.3
index 3b0b17fb8..f3daf98c1 100644
--- a/man3/_Generic.3
+++ b/man3/_Generic.3
@@ -39,10 +39,10 @@ seamlessly upgrading to the widest available type.
#include <stdio.h>
#include <stdlib.h>
-#define my_imaxabs(j) _Generic((intmax_t) 0, \e
- long: labs(j), \e
- long long: llabs(j) \e
- /* long long long: lllabs(j) */ \e
+#define my_imaxabs(j) _Generic(INTMAX_C(0), \e
+ long: labs(j), \e
+ long long: llabs(j) \e
+ /* long long long: lllabs(j) */ \e
)
int