Fix diagnostic for primitive types
This commit is contained in:
@ -17,11 +17,11 @@ along with GCC; see the file COPYING3. If not see
|
||||
|
||||
#include "elna/gcc/elna-tree.h"
|
||||
#include "elna/gcc/elna-diagnostic.h"
|
||||
#include "elna/gcc/elna1.h"
|
||||
|
||||
#include "stor-layout.h"
|
||||
#include "fold-const.h"
|
||||
#include "diagnostic-core.h"
|
||||
#include "stringpool.h"
|
||||
|
||||
namespace elna
|
||||
{
|
||||
@ -144,33 +144,6 @@ namespace gcc
|
||||
return field_declaration;
|
||||
}
|
||||
|
||||
std::shared_ptr<boot::symbol_table<tree>> builtin_symbol_table()
|
||||
{
|
||||
std::shared_ptr<boot::symbol_table<tree>> initial_table =
|
||||
std::make_shared<boot::symbol_table<tree>>();
|
||||
|
||||
initial_table->enter("Int", long_integer_type_node);
|
||||
initial_table->enter("Word", size_type_node);
|
||||
initial_table->enter("Bool", boolean_type_node);
|
||||
initial_table->enter("Float", double_type_node);
|
||||
initial_table->enter("Char", unsigned_char_type_node);
|
||||
initial_table->enter("Byte", make_unsigned_type(8));
|
||||
|
||||
tree string_record = make_node(RECORD_TYPE);
|
||||
tree_chain record_chain;
|
||||
|
||||
record_chain.append(build_field(UNKNOWN_LOCATION, string_record, "length", initial_table->lookup("Word")));
|
||||
record_chain.append(build_field(UNKNOWN_LOCATION, string_record, "ptr",
|
||||
build_pointer_type_for_mode(initial_table->lookup("Char"), VOIDmode, true)));
|
||||
|
||||
TYPE_FIELDS(string_record) = record_chain.head();
|
||||
layout_type(string_record);
|
||||
|
||||
initial_table->enter("String", string_record);
|
||||
|
||||
return initial_table;
|
||||
}
|
||||
|
||||
tree do_pointer_arithmetic(boot::binary_operator binary_operator, tree left, tree right)
|
||||
{
|
||||
if (binary_operator == boot::binary_operator::sum)
|
||||
|
Reference in New Issue
Block a user