From 354a161722889b7839599f364537d93045097cd3 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 22 Jan 2025 20:31:22 +0900 Subject: [PATCH] [qfcc] Fix some gcc purity checks --- tools/qfcc/source/expr_type.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/qfcc/source/expr_type.c b/tools/qfcc/source/expr_type.c index 983356a17..1c4de72f2 100644 --- a/tools/qfcc/source/expr_type.c +++ b/tools/qfcc/source/expr_type.c @@ -74,7 +74,7 @@ typedef struct { static type_func_t type_funcs[]; -static bool +static bool __attribute__((pure)) check_type (const expr_t *arg) { if (arg->type == ex_symbol && arg->symbol->sy_type == sy_type_param) { @@ -130,7 +130,7 @@ check_int (const expr_t *arg) return true; } -static const char * +static const char * __attribute__((pure)) single_type (int arg_count, const expr_t **args) { if (arg_count < 1) { @@ -145,7 +145,7 @@ single_type (int arg_count, const expr_t **args) return nullptr; } -static const char * +static const char * __attribute__((pure)) single_type_property (int arg_count, const expr_t **args) { if (arg_count < 1) { @@ -163,7 +163,7 @@ single_type_property (int arg_count, const expr_t **args) return nullptr; } -static const char * +static const char * __attribute__((pure)) single_type_opt_int (int arg_count, const expr_t **args) { if (arg_count < 1) { @@ -181,7 +181,7 @@ single_type_opt_int (int arg_count, const expr_t **args) return nullptr; } -static const char * +static const char * __attribute__((pure)) single_type_opt_int_pair (int arg_count, const expr_t **args) { if (arg_count < 1) {