diff --git a/src/backends/contextfree.h b/src/backends/contextfree.h index 9105636..29b51a0 100644 --- a/src/backends/contextfree.h +++ b/src/backends/contextfree.h @@ -22,7 +22,7 @@ struct HCFStack_ { }; #ifndef UNUSED -#define UNUSED __attribute__((unused)) +#define UNUSED H_GCC_ATTRIBUTE((unused)) #endif static inline HCFChoice* h_cfstack_new_choice_raw(HAllocator *mm__, HCFStack *stk__) UNUSED; diff --git a/src/bindings/cpp/hammer/hammer_test.hpp b/src/bindings/cpp/hammer/hammer_test.hpp index 77e6daa..f3ab77a 100644 --- a/src/bindings/cpp/hammer/hammer_test.hpp +++ b/src/bindings/cpp/hammer/hammer_test.hpp @@ -5,7 +5,7 @@ #include #include -#define HAMMER_DECL_UNUSED __attribute__((unused)) +#define HAMMER_DECL_UNUSED H_GCC_ATTRIBUTE((unused)) static ::testing::AssertionResult ParseFails (hammer::Parser parser, const std::string &input) HAMMER_DECL_UNUSED; diff --git a/src/bindings/desugar-header.pl b/src/bindings/desugar-header.pl index 5bdd11e..e836ad7 100644 --- a/src/bindings/desugar-header.pl +++ b/src/bindings/desugar-header.pl @@ -11,7 +11,7 @@ while(<>) { } elsif (/^HAMMER_FN_DECL\(([^,]*), ([^,]*), ([^)]*)\);/) { print "$1 $2($3);\n"; print "$1 $2__m(HAllocator* mm__, $3);\n"; - } elsif (/^HAMMER_FN_DECL_VARARGS_ATTR\((__attribute__\(\([^)]*\)\)), ([^,]*), ([^,]*), ([^)]*)\);/) { + } elsif (/^HAMMER_FN_DECL_VARARGS_ATTR\((H_GCC_ATTRIBUTE\(\([^)]*\)\)), ([^,]*), ([^,]*), ([^)]*)\);/) { print "$2 $3($4, ...);\n"; print "$2 $3__m(HAllocator *mm__, $4, ...);\n"; print "$2 $3__a(void* args);\n";