An option "-Wno-language-extension-token" suppressed the above.
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_pupc.h:34:78: warning: token pasting of ',' and VA_ARGS is a GNU extension [-Wgnu]
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/collectives/upc_coll_init.upc:35:7: warning: implicit
declaration of function '__upc_exit' is invalid in C99 [-Wimplicit-function-declaration]
exit (1);
^
:167:14: note: expanded from here
# define exit __upc_exit
---
In the above, it seems that upc_coll_init.upc is missing inclusion of . Things are getting strange here as we do not provide the prototype for "__upc_exit()", but instead, "exit()" prototype in stdlib.h is being converted into __upc_exit() prototype.
After converting "exit()" into "upc_global_exit()" the warning disappeared.
---
[ 90%] Building C object tools/clang/runtime/libupc/CMakeFiles/upc.dir/smp/upc_alloc.upc.o
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_alloc.upc:241:45: warning: implicit
declaration of function '__upc_vm_get_cur_page_alloc' is invalid in C99 [-Wimplicit-function-declaration]
## const upc_page_num_t cur_page_alloc = __upc_vm_get_cur_page_alloc ();
The above warning comes from the fact that we don't include "upc-lib.h" when compiling non-optimized. Prototypes are defined in the upc-lib.h.
---
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_vm.c:344:20: warning: arithmetic on a
pointer to void is a GNU extension [-Wpointer-arith]
## addr = page_base + p_offset;
addr and page_vase are declared void. We probably need to add some cast.
While compiling libupc the following warnings come up.
Many warnings of this kind:
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_vm.c:78:3: warning: extension used [-Wlanguage-extension-token] GUPCR_FENCE (); ^ /eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_sync.h:35:25: note: expanded from macro 'GUPCR_FENCE'
define GUPCR_FENCE() { GUPCR_READ_FENCE (); GUPCR_WRITE_FENCE (); }
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_sync.h:45:28: note: expanded from macro 'GUPCR_READ_FENCE'
define GUPCR_READ_FENCE() asm volatile ("":::"memory")
An option "-Wno-language-extension-token" suppressed the above.
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_pupc.h:34:78: warning: token pasting of ',' and VA_ARGS is a GNU extension [-Wgnu]
define p_atomic(evttag, ...) pupc_event_atomicg (evttag, filename, linenum, ##VA_ARGS)
An option "-Wno-gnu" suppressed the warning.
/eng/upc/dev/nenad/clang-upc/src/llvm/tools/clang/runtime/libupc/collectives/upc_coll_init.upc:35:7: warning: implicit declaration of function '__upc_exit' is invalid in C99 [-Wimplicit-function-declaration] exit (1); ^