diff --git a/libplum/libplum.nim b/libplum/libplum.nim index 8de5c8b..4ea5f8e 100644 --- a/libplum/libplum.nim +++ b/libplum/libplum.nim @@ -15,17 +15,6 @@ const libraryPath = libplumPath & "/libplum.a" {.passc: "-I" & includePath & " -DPLUM_STATIC".} {.passl: libraryPath.} -# libplum declares some parameters as `const T*` in C (read-only pointer). -# Nim has no equivalent, so the generated C code drops the `const`, causing -# a type mismatch warning in GCC 15+. This pragma suppresses that warning -# only in this translation unit and is valid for both C and C++. -{. - emit: """ -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wno-incompatible-pointer-types" -#endif -""" -.} when defined(windows): {.passl: "-lws2_32 -liphlpapi -lbcrypt".} diff --git a/libplum/plum.nim b/libplum/plum.nim index 9201756..3ce65e4 100644 --- a/libplum/plum.nim +++ b/libplum/plum.nim @@ -12,6 +12,10 @@ import chronos/threadsync import results import ./libplum +# libplum declares some parameters as `const T*` in C (read-only pointer). +# Nim has no equivalent, so the generated C code drops the `const`, causing +# a type mismatch warning in GCC 15+. This pragma suppresses that warning +# only in this translation unit and is valid for both C and C++. {. emit: """ #ifdef __GNUC__