diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/elna/boot/semantic.h | 15 | ||||
| -rw-r--r-- | include/elna/gcc/elna-generic.h | 4 | ||||
| -rw-r--r-- | include/elna/gcc/elna-tree.h | 1 |
3 files changed, 17 insertions, 3 deletions
diff --git a/include/elna/boot/semantic.h b/include/elna/boot/semantic.h index 82ef5f1..0f8f6c7 100644 --- a/include/elna/boot/semantic.h +++ b/include/elna/boot/semantic.h @@ -177,6 +177,21 @@ namespace elna::boot }; /** + * Type passed to a trait like #min or #max does not support + * the trait. + */ + class unsupported_trait_type_error : public error + { + type actual; + std::string trait_name; + + public: + unsupported_trait_type_error(const identifier& trait, type actual); + + std::string what() const override; + }; + + /** * Checks types. */ class type_analysis_visitor final : public walking_visitor, public error_container diff --git a/include/elna/gcc/elna-generic.h b/include/elna/gcc/elna-generic.h index 23e1738..e0f20f3 100644 --- a/include/elna/gcc/elna-generic.h +++ b/include/elna/gcc/elna-generic.h @@ -40,7 +40,8 @@ namespace elna::gcc void enter_scope(); tree leave_scope(); - void make_if_branch(boot::conditional_statements& branch, tree goto_endif); + tree make_if_branch(boot::conditional_statements& branch, tree next, + tree goto_append = NULL_TREE); tree build_arithmetic_operation(boot::binary_expression *expression, tree_code operator_code, tree left, tree right); @@ -56,7 +57,6 @@ namespace elna::gcc void build_assert_builtin(location_t call_location, const std::vector<boot::expression *>& arguments); bool expect_trait_type_only(boot::traits_expression *trait); - bool expect_trait_for_integral_type(boot::traits_expression *trait); void visit_statements(const std::vector<boot::statement *>& statements); bool assert_constant(location_t expression_location); diff --git a/include/elna/gcc/elna-tree.h b/include/elna/gcc/elna-tree.h index f1402a7..556d52b 100644 --- a/include/elna/gcc/elna-tree.h +++ b/include/elna/gcc/elna-tree.h @@ -82,7 +82,6 @@ namespace elna::gcc tree_code operator_code, tree left, tree right); tree build_field(location_t location, tree record_type, const std::string name, tree type); tree find_field_by_name(location_t expression_location, tree type, const std::string& field_name); - tree build_global_pointer_type(tree type); tree build_static_array_type(tree type, const std::uint64_t size); tree build_enumeration_type(const std::vector<std::string>& members); tree build_label_decl(const char *name, location_t loc); |
