mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-01-17 04:48:08 +08:00
suppress warning on discard attribute on forwards
This commit is contained in:
parent
5fd77aa198
commit
1b1c9186a4
@ -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__)
|
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__APPLE__)
|
||||||
// use aliasing to alias the exported function to one of our `mi_` functions
|
// use aliasing to alias the exported function to one of our `mi_` functions
|
||||||
#if (defined(__GNUC__) && __GNUC__ >= 9)
|
#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)));
|
#define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default"), copy(fun)));
|
||||||
#else
|
#else
|
||||||
#define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default")));
|
#define MI_FORWARD(fun) __attribute__((alias(#fun), used, visibility("default")));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user