From 6b131c925dee7a5f97516edd581e051e08bb52d8 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 20 Jul 2026 16:09:24 +0200 Subject: Implement min and max for booleans and floats --- include/elna/boot/evaluator.h | 2 +- include/elna/gcc/elna-generic.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/elna/boot/evaluator.h b/include/elna/boot/evaluator.h index f1a5437..08aec6b 100644 --- a/include/elna/boot/evaluator.h +++ b/include/elna/boot/evaluator.h @@ -80,11 +80,11 @@ namespace elna::boot std::optional evaluate_unary(unary_expression& subject); std::optional evaluate_binary(binary_expression& subject); std::optional evaluate_cast(cast_expression& subject); - std::optional evaluate_traits(traits_expression& subject); std::optional evaluate_traits_size(const type& subject); std::optional evaluate_traits_alignment(const type& subject); public: + std::optional evaluate_traits(traits_expression& subject); explicit evaluator(symbol_bag& bag, const target_info& target, const std::map& evaluated_initializers); diff --git a/include/elna/gcc/elna-generic.h b/include/elna/gcc/elna-generic.h index 9dea83b..aa4bde1 100644 --- a/include/elna/gcc/elna-generic.h +++ b/include/elna/gcc/elna-generic.h @@ -17,8 +17,11 @@ along with GCC; see the file COPYING3. If not see #pragma once +#include +#include #include #include "elna/boot/ast.h" +#include "elna/boot/evaluator.h" #include "elna/boot/symbol.h" #include "elna/gcc/elna-tree.h" @@ -36,6 +39,8 @@ namespace elna::gcc elna::boot::symbol_bag bag; std::shared_ptr symbols; const elna::boot::target_info& target; + std::map evaluated_initializers; + std::unique_ptr const_evaluator; void enter_scope(); tree leave_scope(); -- cgit v1.2.3