From f738639d68883698a23ae72770478d990e8489e9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 13 Mar 2020 19:58:07 +0900 Subject: [PATCH] Revert "[qfcc} Mark some more functions as pure" This reverts commit 65b48c734c2efc1194e2cdec4469fd7d35043cf8. I forgot that get_type calls convert_name, which most definitely is not pure. Fixes the segfault in scheme. --- tools/qfcc/include/expr.h | 4 ++-- tools/qfcc/source/switch.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qfcc/include/expr.h b/tools/qfcc/include/expr.h index 65c8ad290..b25481a8f 100644 --- a/tools/qfcc/include/expr.h +++ b/tools/qfcc/include/expr.h @@ -264,7 +264,7 @@ extern expr_t *local_expr; \return Pointer to the type description, or null if the expression type (expr_t::type) is inappropriate. */ -struct type_s *get_type (expr_t *e) __attribute__((pure)); +struct type_s *get_type (expr_t *e); /** Get the basic type code of the expression result. @@ -272,7 +272,7 @@ struct type_s *get_type (expr_t *e) __attribute__((pure)); \return Pointer to the type description, or ev_type_count if get_type() returns null. */ -etype_t extract_type (expr_t *e) __attribute__((pure)); +etype_t extract_type (expr_t *e); /** Create a new expression node. diff --git a/tools/qfcc/source/switch.c b/tools/qfcc/source/switch.c index 6c00279a0..967a7b73f 100644 --- a/tools/qfcc/source/switch.c +++ b/tools/qfcc/source/switch.c @@ -85,7 +85,7 @@ get_hash (const void *_cl, void *unused) return Hash_Buffer (&val->v, sizeof (val->v)) + val->lltype; } -static int __attribute__((pure)) +static int compare (const void *_cla, const void *_clb, void *unused) { case_label_t *cla = (case_label_t *) _cla;