Poisoning in HotSpot
Kim Barrett
kim.barrett at oracle.com
Sat Nov 30 20:16:01 UTC 2024
On 11/30/24 2:56 PM, Kim Barrett wrote:
> namespace forbidden_functions_support {
> struct Forbidden {};
> }
>
> // name must be unqualified.
> #define FORBID_C_FUNCTION(name) \
> namespace forbidden_functions_support { \
> using ::name; \
> } \
> inline namespace forbidden_functions { \
> forbidden_functions_support::Forbidden name{}; \
> }
>
Even simpler. Don't need the Forbidden struct.
// name must be unqualified.
#define FORBID_C_FUNCTION(name) \
namespace forbidden_functions_support { \
using ::name; \
} \
inline namespace forbidden_functions { \
const int name = 0; \
}
More information about the hotspot-dev
mailing list