And show the pointer value in the example, and show also those
of &labs and &llabs to compare.
Cc: JeanHeyd Meneide <wg14@soasis.org>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Signed-off-by: Alex Colomar <alx.manpages@gmail.com>
#include <stdio.h>
#include <stdlib.h>
-#define my_imaxabs(j) _Generic(INTMAX_C(0), \e
- long: labs(j), \e
- long long: llabs(j) \e
- /* long long long: lllabs(j) */ \e
+#define my_imaxabs _Generic(INTMAX_C(0), \e
+ long: labs, \e
+ long long: llabs \e
+ /* long long long: lllabs */ \e
)
int
a = \-42;
printf("imaxabs(%jd) == %jd\en", (intmax_t) a, my_imaxabs(a));
+ printf("&imaxabs == %p\en", &my_imaxabs);
+ printf("&labs == %p\en", &labs);
+ printf("&llabs == %p\en", &llabs);
exit(EXIT_SUCCESS);
}