Zoltan: Build warnings about non-ISO-C print format specifier
Created by: mhoemmen
@trilinos/zoltan
When I build Zoltan with GCC 7.2 and CUDA, I get many instances of the following warnings:
In file included from .../Trilinos/packages/zoltan/src/include/zoltan.h:51:0,
from .../Trilinos/packages/zoltan/src/zz/zz_const.h:58,
from .../Trilinos/packages/zoltan/src/zz/zz_gen_files.c:52:
.../Trilinos/packages/zoltan/src/zz/zz_gen_files.c: In function ‘Zoltan_Generate_Files’:
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:25: warning: ISO C does not support the ‘%Lu’ gnu_printf format [-Wformat=]
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/zz/zz_gen_files.c:467:21: note: in expansion of macro ‘ZOLTAN_ID_SPEC’
fprintf(fp, ZOLTAN_ID_SPEC " " ZOLTAN_ID_SPEC " 1.0 %d\n",
^~~~~~~~~~~~~~
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:28: note: format string is defined here
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:25: warning: ISO C does not support the ‘%Lu’ gnu_printf format [-Wformat=]
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/zz/zz_gen_files.c:467:21: note: in expansion of macro ‘ZOLTAN_ID_SPEC’
fprintf(fp, ZOLTAN_ID_SPEC " " ZOLTAN_ID_SPEC " 1.0 %d\n",
^~~~~~~~~~~~~~
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:28: note: format string is defined here
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:25: warning: ISO C does not support the ‘%Lu’ gnu_printf format [-Wformat=]
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/zz/zz_gen_files.c:495:19: note: in expansion of macro ‘ZOLTAN_ID_SPEC’
fprintf(fp, ZOLTAN_ID_SPEC " ", vptr[0] + vtxOffset);
^~~~~~~~~~~~~~
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:28: note: format string is defined here
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:25: warning: ISO C does not support the ‘%Lu’ gnu_printf format [-Wformat=]
#define ZOLTAN_ID_SPEC "%Lu"
^
.../Trilinos/packages/zoltan/src/zz/zz_gen_files.c:526:21: note: in expansion of macro ‘ZOLTAN_ID_SPEC’
fprintf(fp, ZOLTAN_ID_SPEC " ", eptr[0] + edgeOffset);
^~~~~~~~~~~~~~
.../Trilinos/packages/zoltan/src/include/zoltan_types.h:174:28: note: format string is defined here
#define ZOLTAN_ID_SPEC "%Lu"
^
Motivation and Context
If %Lu
is GNU-specific, it may not build on other compilers, or may not be supported there. It may not be possible to tell until run time.