From f66c6114f9bdb938fada37bfafe0703cd9f79d22 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 1 Jun 2026 15:27:47 +0400 Subject: [PATCH] Remove duplicated pragma --- libplum/libplum.nim | 11 ----------- libplum/plum.nim | 4 ++++ 2 files changed, 4 insertions(+), 11 deletions(-) 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__