aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-08 17:17:15 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-08 17:17:15 -0400
commitaeed1992e94c5ab6a5104a06a921101fbe8f40ed (patch)
tree8ba6dc531acefa0eedd330224f16f750496e8dbe /ast.h
parentcf9d5b1619b9e5e886d2754f167046ff77d36abf (diff)
Fix nearly every GCC warning and add __attribute__((pure/const)) where
appropriate
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ast.h b/ast.h
index 53adb6a8..0306cef3 100644
--- a/ast.h
+++ b/ast.h
@@ -76,6 +76,7 @@ struct type_ast_s {
file_t *file;
const char *start, *end;
union {
+#pragma GCC diagnostic ignored "-Wpedantic"
struct {} UnknownTypeAST;
struct {
const char *name;
@@ -308,6 +309,6 @@ CORD ast_to_xml(ast_t *ast);
CORD type_ast_to_xml(type_ast_t *ast);
int printf_ast(FILE *stream, const struct printf_info *info, const void *const args[]);
ast_list_t *get_ast_children(ast_t *ast);
-bool is_idempotent(ast_t *ast);
+PUREFUNC bool is_idempotent(ast_t *ast);
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0