From 1b1c9186a4a62c959140f437fa5e745dd159e854 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Wed, 27 Oct 2021 19:06:27 -0700 Subject: [PATCH] suppress warning on discard attribute on forwards --- src/alloc-override.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/alloc-override.c b/src/alloc-override.c index af9035dd..6c42ae00 100644 --- a/src/alloc-override.c +++ b/src/alloc-override.c @@ -22,6 +22,7 @@ terms of the MIT license. A copy of the license can be found in the file #if (defined(__GNUC__) || defined(__clang__)) && !defined(__APPLE__) // use aliasing to alias the exported function to one of our `mi_` functions #if (defined(__GNUC__) && __GNUC__ >= 9) + #pragma GCC diagnostic ignored "-Wattributes" // or we get warnings that nodiscard is ignored on a forward #define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default"), copy(fun))); #else #define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default")));