Remove duplicated pragma

This commit is contained in:
Arnaud 2026-06-01 15:27:47 +04:00
parent 4532517ca5
commit f66c6114f9
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA
2 changed files with 4 additions and 11 deletions

View File

@ -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".}

View File

@ -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__