Hi Biswapriyo, Thanks for the report and patch.
I prefer a patch without #if. And the intermediate type can be intptr_t, uintptr_t, or size_t. I prefer size_t because that's how gperf does it (and gperf does it like this because it avoids including <stdint.h>). 2020-06-15 Bruno Haible <br...@clisp.org> unictype/joininggroup-name: Fix warning on 64-bit mingw. Reported by Biswapriyo Nath <nathbap...@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00036.html>. * lib/unictype/joininggroup_name.c (ELEM): Cast struct offset to size_t first. diff --git a/lib/unictype/joininggroup_name.c b/lib/unictype/joininggroup_name.c index dc683f8..b45ab5c 100644 --- a/lib/unictype/joininggroup_name.c +++ b/lib/unictype/joininggroup_name.c @@ -40,7 +40,7 @@ static const struct joining_group_stringpool_t joining_group_stringpool_contents static const int joining_group_index[] = { -#define ELEM(tag,string) (int)(long)&((struct joining_group_stringpool_t *)0)->tag, +#define ELEM(tag,string) (int)(size_t)&((struct joining_group_stringpool_t *)0)->tag, #include "unictype/joininggroup_name.h" #undef ELEM };